<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CryptoAuthLib: atca_command.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CryptoAuthLib
   </div>
   <div id="projectbrief">Microchip CryptoAuthentication Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00146_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">atca_command.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="a00146.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#ifndef ATCA_COMMAND_H</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#define ATCA_COMMAND_H</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00149.html">atca_compiler.h</a>&quot;</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00173.html">atca_status.h</a>&quot;</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00158.html">atca_devtypes.h</a>&quot;</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#include &lt;stddef.h&gt;</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="a01001.html">   52</a></span>&#160;<span class="keyword">struct </span><a class="code" href="a01001.html">atca_command</a></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;{</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="a01001.html#aebea355958c50f7d6a7d946f33ddc0aa">   54</a></span>&#160;    <a class="code" href="a00988.html#gafb234ccd6a80d09c0efbe336c2354267">ATCADeviceType</a> <a class="code" href="a01001.html#aebea355958c50f7d6a7d946f33ddc0aa">dt</a>;</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="a01001.html#a380510ad0d2dbde608f38387436db3bc">   55</a></span>&#160;    uint8_t        <a class="code" href="a01001.html#a380510ad0d2dbde608f38387436db3bc">clock_divider</a>;</div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="a01001.html#a77632045612dbd0a5ac4488567c14dd3">   56</a></span>&#160;    uint16_t       <a class="code" href="a01001.html#a77632045612dbd0a5ac4488567c14dd3">execution_time_msec</a>;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;};</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="comment">/*--- ATCACommand ---------*/</span></div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="a00987.html#gaebeafc249bfe2b00b6809d5c328841d9">   60</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a01001.html">atca_command</a>* <a class="code" href="a00987.html#gaebeafc249bfe2b00b6809d5c328841d9">ATCACommand</a>;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#gaf4177bd66c5981ba86511608150c024e">initATCACommand</a>(<a class="code" href="a00988.html#gafb234ccd6a80d09c0efbe336c2354267">ATCADeviceType</a> device_type, <a class="code" href="a01001.html">ATCACommand</a> ca_cmd);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<a class="code" href="a01001.html">ATCACommand</a> <a class="code" href="a00987.html#gac004e4f2b9a435f9de6cea523c0e9a2d">newATCACommand</a>(<a class="code" href="a00988.html#gafb234ccd6a80d09c0efbe336c2354267">ATCADeviceType</a> device_type);</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00987.html#ga9404883f6b81e6356862a9bb4b42d4a9">deleteATCACommand</a>(<a class="code" href="a01001.html">ATCACommand</a> *ca_cmd);</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="comment">/* add ATCACommand declarations here</span></div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="comment"> * since these are still C functions, not classes, naming is an important</span></div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="comment"> * consideration to keep the namespace from colliding with other 3rd party</span></div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="comment"> * libraries or even ourselves/ASF.</span></div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="comment"> * Basic conventions:</span></div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="comment"> * all methods start with the prefix &#39;at&#39;</span></div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="comment"> * all method names must be unique, obviously</span></div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="comment"> * all method implementations should be proceeded by their Doxygen comment header</span></div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="comment"> **/</span></div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="comment">// this is the ATCACommand parameter structure.  The caller to the command method must</span></div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="comment">// initialize param1, param2 and data if appropriate.  The command method will fill in the rest</span></div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="comment">// and initialize the packet so it&#39;s ready to send via the ATCAIFace.</span></div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="comment">// this particular structure mimics the ATSHA and ATECC family device&#39;s command structures</span></div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="comment">// Note: pack @ 2 is required, @ 1 causes word alignment crash (though it should not), a known bug in GCC.</span></div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="comment">// @2, the wire still has the intended byte alignment with arm-eabi.  this is likely the least portable part of atca</span></div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="preprocessor">#pragma pack( push, ATCAPacket, 2 )</span></div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="a01005.html">   93</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;{</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="comment">// used for transmit/send</span></div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="a01005.html#ad64c25d49d8bac111d62c92a0e552289">   97</a></span>&#160;    uint8_t <a class="code" href="a01005.html#ad64c25d49d8bac111d62c92a0e552289">_reserved</a>;  <span class="comment">// used by HAL layer as needed (I/O tokens, Word address values)</span></div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <span class="comment">//--- start of packet i/o frame----</span></div><div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="a01005.html#a3c02ddae56a01b6df3be14acf14915a4">  100</a></span>&#160;    uint8_t  <a class="code" href="a01005.html#a3c02ddae56a01b6df3be14acf14915a4">txsize</a>;</div><div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="a01005.html#a5c1b56e6bccc2a95dbddf1a08e56e87d">  101</a></span>&#160;    uint8_t  <a class="code" href="a01005.html#a5c1b56e6bccc2a95dbddf1a08e56e87d">opcode</a>;</div><div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="a01005.html#aec4226da1b99c821237b6805c4e31333">  102</a></span>&#160;    uint8_t  <a class="code" href="a01005.html#aec4226da1b99c821237b6805c4e31333">param1</a>;    <span class="comment">// often same as mode</span></div><div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="a01005.html#a16a7565b150a9c17a39c80fc932b9514">  103</a></span>&#160;    uint16_t <a class="code" href="a01005.html#a16a7565b150a9c17a39c80fc932b9514">param2</a>;</div><div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="a01005.html#a0a6faa98b4d6b0b87ec0127daee17d11">  104</a></span>&#160;    uint8_t  data[192]; <span class="comment">// includes 2-byte CRC.  data size is determined by largest possible data section of any</span></div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;                        <span class="comment">// command + crc (see: x08 verify data1 + data2 + data3 + data4)</span></div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;                        <span class="comment">// this is an explicit design trade-off (space) resulting in simplicity in use</span></div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;                        <span class="comment">// and implementation</span></div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <span class="comment">//--- end of packet i/o frame</span></div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    <span class="comment">// used for receive</span></div><div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="a01005.html#a7f16544e2e38e2a389b69be0a7156986">  111</a></span>&#160;    uint8_t <a class="code" href="a01005.html#a7f16544e2e38e2a389b69be0a7156986">execTime</a>;       <span class="comment">// execution time of command by opcode</span></div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    <span class="comment">// structure should be packed since it will be transmitted over the wire</span></div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    <span class="comment">// this method varies by compiler.  As new compilers are supported, add their structure packing method here</span></div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;} <a class="code" href="a01005.html">ATCAPacket</a>;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="preprocessor">#pragma pack( pop, ATCAPacket)</span></div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#gae82a969d437b648238fe1c1ddbd51196">atCheckMAC</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#ga8a61451b473025766f0b8aaf8cbe8878">atCounter</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#ga8e8e14d6ac01e36f5c62568a6203e158">atDeriveKey</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet, <span class="keywordtype">bool</span> has_mac);</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#ga5460e5bb2178eb95a3b8db8018d30617">atECDH</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#ga96b33dc28e87b1c1855b7f828a89594b">atGenDig</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet, <span class="keywordtype">bool</span> is_no_mac_key);</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#gaba4a495c2021c837c6de4cdeaaf64813">atGenKey</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#ga31f11cb28f4aaf6c654e92e7c5176814">atHMAC</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#gaf5b69354b7f33537f2ffef3376843a15">atInfo</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#gac649ffd477409f414dfcc7e38c19e203">atLock</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#ga6375d9724ac9ec208e22224c0a210fb3">atMAC</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#gab0937e5d717246f51a244e3369e554e6">atNonce</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#gae9bbe9f768acf9628bbb78fbebb21221">atPause</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#gaf90f39bafcd296962ceef461954a1998">atPrivWrite</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#gad16fd3d0f3602f4654c29101f35bd2a1">atRandom</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#ga17fa9d23b7e46c2eb32f8ae6132bb3c4">atRead</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#ga5ecdb99e756b1740ad2119f13c3ab809">atSecureBoot</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#ga44ad135152469c980f9bf36a5f1477bb">atSHA</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet, uint16_t write_context_size);</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#gaf41d61bc7317d325a34169eb53c29e7c">atSign</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#ga3890dfc5d5a3ec121ba7436fe90bee23">atUpdateExtra</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#ga2beb9e8360555ededb666ad845219fce">atVerify</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#gaab5bc48599e5f6b938901739f4f46fa7">atWrite</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet, <span class="keywordtype">bool</span> has_mac);</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#ga17ffd71c28597552f5c4517096ef1fb8">atAES</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#ga47c96fd19a050247f7c06e20c296b958">atSelfTest</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#ga881ba1c37e33cf65c17983e93dd8c677">atKDF</a>(<a class="code" href="a01001.html">ATCACommand</a> ca_cmd, <a class="code" href="a01005.html">ATCAPacket</a> *packet);</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="a00987.html#gaae5866a78d2f0464b04eee9ef1f97030">atIsSHAFamily</a>(<a class="code" href="a00988.html#gafb234ccd6a80d09c0efbe336c2354267">ATCADeviceType</a> device_type);</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="a00987.html#gae82dca54cc3fd1cc2f1671e98d64df07">atIsECCFamily</a>(<a class="code" href="a00988.html#gafb234ccd6a80d09c0efbe336c2354267">ATCADeviceType</a> device_type);</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#gae41108996848638519849163e51cd10a">isATCAError</a>(uint8_t *data);</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;<span class="comment">// command helpers</span></div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00987.html#ga53ded4ed630b6ef4d292056c2e6b34f6">atCRC</a>(<span class="keywordtype">size_t</span> length, <span class="keyword">const</span> uint8_t *data, uint8_t *crc_le);</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00987.html#ga54460acd927854db5d39d6d5c3e8ed7c">atCalcCrc</a>(<a class="code" href="a01005.html">ATCAPacket</a> *pkt);</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00987.html#ga7723a58d1781b3ba54e8f45d5729b33a">atCheckCrc</a>(<span class="keyword">const</span> uint8_t *response);</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;<span class="comment">/* command definitions */</span></div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="a00987.html#gac978ae798bc2c020c7b8a2e5a258016e">  160</a></span>&#160;<span class="preprocessor">#define ATCA_CMD_SIZE_MIN       ((uint8_t)7)</span></div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;<span class="preprocessor">#define ATCA_CMD_SIZE_MAX       ((uint8_t)4 * 36 + 7)</span></div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;<span class="preprocessor">#define CMD_STATUS_SUCCESS      ((uint8_t)0x00)</span></div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;<span class="preprocessor">#define CMD_STATUS_WAKEUP       ((uint8_t)0x11)</span></div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<span class="preprocessor">#define CMD_STATUS_BYTE_PARSE   ((uint8_t)0x03)</span></div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;<span class="preprocessor">#define CMD_STATUS_BYTE_ECC     ((uint8_t)0x05)</span></div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;<span class="preprocessor">#define CMD_STATUS_BYTE_EXEC    ((uint8_t)0x0F)</span></div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="preprocessor">#define CMD_STATUS_BYTE_COMM    ((uint8_t)0xFF)</span></div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;</div><div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="a00987.html#ga1f9bb707789dc9194b06403113c9dfaf">  178</a></span>&#160;<span class="preprocessor">#define ATCA_CHECKMAC     ((uint8_t)0x28)  </span></div><div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="a00987.html#gac9405ff4647b09a6d8ab7a4d8a091ee8">  179</a></span>&#160;<span class="preprocessor">#define ATCA_DERIVE_KEY   ((uint8_t)0x1C)  </span></div><div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="a00987.html#ga0e74f12b91b93e683f27fb8b4c0bfb2f">  180</a></span>&#160;<span class="preprocessor">#define ATCA_INFO         ((uint8_t)0x30)  </span></div><div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="a00987.html#ga37e24393c3e995d47a09ad962b6b83de">  181</a></span>&#160;<span class="preprocessor">#define ATCA_GENDIG       ((uint8_t)0x15)  </span></div><div class="line"><a name="l00182"></a><span class="lineno"><a class="line" href="a00987.html#ga17f002359b157bee44a3c071a5a206db">  182</a></span>&#160;<span class="preprocessor">#define ATCA_GENKEY       ((uint8_t)0x40)  </span></div><div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="a00987.html#ga36122a4f84ec0c31330c3c0458304029">  183</a></span>&#160;<span class="preprocessor">#define ATCA_HMAC         ((uint8_t)0x11)  </span></div><div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="a00987.html#gac227802d9a5680688ac4c2b23b38273c">  184</a></span>&#160;<span class="preprocessor">#define ATCA_LOCK         ((uint8_t)0x17)  </span></div><div class="line"><a name="l00185"></a><span class="lineno"><a class="line" href="a00987.html#gaa0843d9ec7e246455483a1fb1fdf3a07">  185</a></span>&#160;<span class="preprocessor">#define ATCA_MAC          ((uint8_t)0x08)  </span></div><div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="a00987.html#ga232e4a2b3f189cc2c3594ce5f18da3aa">  186</a></span>&#160;<span class="preprocessor">#define ATCA_NONCE        ((uint8_t)0x16)  </span></div><div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="a00987.html#ga7d786006183912073939b3f62075dd27">  187</a></span>&#160;<span class="preprocessor">#define ATCA_PAUSE        ((uint8_t)0x01)  </span></div><div class="line"><a name="l00188"></a><span class="lineno"><a class="line" href="a00987.html#ga3171c7ab4447a2e752706bed1072e694">  188</a></span>&#160;<span class="preprocessor">#define ATCA_PRIVWRITE    ((uint8_t)0x46)  </span></div><div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="a00987.html#gace94188e9d741a9b44616474b633064f">  189</a></span>&#160;<span class="preprocessor">#define ATCA_RANDOM       ((uint8_t)0x1B)  </span></div><div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="a00987.html#ga8760372110d92cea3570a5720db05de2">  190</a></span>&#160;<span class="preprocessor">#define ATCA_READ         ((uint8_t)0x02)  </span></div><div class="line"><a name="l00191"></a><span class="lineno"><a class="line" href="a00987.html#ga516dbf4bbd2c4b366e0306890d0bca56">  191</a></span>&#160;<span class="preprocessor">#define ATCA_SIGN         ((uint8_t)0x41)  </span></div><div class="line"><a name="l00192"></a><span class="lineno"><a class="line" href="a00987.html#ga19c9a91ccf069c8bc7afa0d5a2bc6fd2">  192</a></span>&#160;<span class="preprocessor">#define ATCA_UPDATE_EXTRA ((uint8_t)0x20)  </span></div><div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="a00987.html#ga8e357a6e926176155fe47aba97d915fb">  193</a></span>&#160;<span class="preprocessor">#define ATCA_VERIFY       ((uint8_t)0x45)  </span></div><div class="line"><a name="l00194"></a><span class="lineno"><a class="line" href="a00987.html#gab04d6b6e9e5a2c4c28733a6f4f3b0771">  194</a></span>&#160;<span class="preprocessor">#define ATCA_WRITE        ((uint8_t)0x12)  </span></div><div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="a00987.html#ga06c1c02df3023d78b6b224060966460f">  195</a></span>&#160;<span class="preprocessor">#define ATCA_ECDH         ((uint8_t)0x43)  </span></div><div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="a00987.html#ga9599c4331857f1daa543a31fcce650fd">  196</a></span>&#160;<span class="preprocessor">#define ATCA_COUNTER      ((uint8_t)0x24)  </span></div><div class="line"><a name="l00197"></a><span class="lineno"><a class="line" href="a00987.html#ga8e5f11692a8a23e1410d9b5ce8bebc2b">  197</a></span>&#160;<span class="preprocessor">#define ATCA_SHA          ((uint8_t)0x47)  </span></div><div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="a00987.html#ga4edf9367ffdc790e886166890fc814c1">  198</a></span>&#160;<span class="preprocessor">#define ATCA_AES          ((uint8_t)0x51)  </span></div><div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="a00987.html#ga1c0632a1eabc73aaebcb4c7f265b8a00">  199</a></span>&#160;<span class="preprocessor">#define ATCA_KDF          ((uint8_t)0x56)  </span></div><div class="line"><a name="l00200"></a><span class="lineno"><a class="line" href="a00987.html#gaf4aab184dc60e2de854994d26d57dfde">  200</a></span>&#160;<span class="preprocessor">#define ATCA_SECUREBOOT   ((uint8_t)0x80)  </span></div><div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="a00987.html#gacbec80dc1b5f24d3013c2a9b06c11bdc">  201</a></span>&#160;<span class="preprocessor">#define ATCA_SELFTEST     ((uint8_t)0x77)  </span></div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;</div><div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="a00987.html#gaa0117f3d3f9a9ae65a3fab1e68b7caef">  211</a></span>&#160;<span class="preprocessor">#define ATCA_BLOCK_SIZE             (32)                               </span></div><div class="line"><a name="l00212"></a><span class="lineno"><a class="line" href="a00987.html#ga555bdf8fa32d4d47577f7748ca928389">  212</a></span>&#160;<span class="preprocessor">#define ATCA_WORD_SIZE              (4)                                </span></div><div class="line"><a name="l00213"></a><span class="lineno"><a class="line" href="a00987.html#gae52318f0263884ff3a3e67328138cc75">  213</a></span>&#160;<span class="preprocessor">#define ATCA_PUB_KEY_PAD            (4)                                </span></div><div class="line"><a name="l00214"></a><span class="lineno"><a class="line" href="a00987.html#gab112a8a280ac5ad6e11b5fe2cc0be0a0">  214</a></span>&#160;<span class="preprocessor">#define ATCA_SERIAL_NUM_SIZE        (9)                                </span></div><div class="line"><a name="l00215"></a><span class="lineno"><a class="line" href="a00987.html#ga882f14cac02df8282ccad2a43afc8a23">  215</a></span>&#160;<span class="preprocessor">#define ATCA_RSP_SIZE_VAL           ((uint8_t)7)                       </span></div><div class="line"><a name="l00216"></a><span class="lineno"><a class="line" href="a00987.html#gafa043ddb1952520a2bba28ac41a98f93">  216</a></span>&#160;<span class="preprocessor">#define ATCA_KEY_COUNT              (16)                               </span></div><div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="a00987.html#gae8b9077022cc706947fdc8b45a573d81">  217</a></span>&#160;<span class="preprocessor">#define ATCA_ECC_CONFIG_SIZE        (128)                              </span></div><div class="line"><a name="l00218"></a><span class="lineno"><a class="line" href="a00987.html#ga1887d11853092541df18c2a04fb6b87a">  218</a></span>&#160;<span class="preprocessor">#define ATCA_SHA_CONFIG_SIZE        (88)                               </span></div><div class="line"><a name="l00219"></a><span class="lineno"><a class="line" href="a00987.html#ga4c05f7bd221df19c5c6ad1fe1f4709be">  219</a></span>&#160;<span class="preprocessor">#define ATCA_OTP_SIZE               (64)                               </span></div><div class="line"><a name="l00220"></a><span class="lineno"><a class="line" href="a00987.html#ga0b96c7eee244d44c648245421745db12">  220</a></span>&#160;<span class="preprocessor">#define ATCA_DATA_SIZE              (ATCA_KEY_COUNT * ATCA_KEY_SIZE)   </span></div><div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="a00987.html#ga6ce84aad51d25e05139f83ac9ca2b162">  221</a></span>&#160;<span class="preprocessor">#define ATCA_AES_GFM_SIZE            ATCA_BLOCK_SIZE                   </span></div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00223"></a><span class="lineno"><a class="line" href="a00987.html#ga6eaf90b702c122de71a18a9b2bd43ba7">  223</a></span>&#160;<span class="preprocessor">#define ATCA_CHIPMODE_OFFSET           (19)                            </span></div><div class="line"><a name="l00224"></a><span class="lineno"><a class="line" href="a00987.html#ga74a13b4b6304a02b4e006901b6ac1de5">  224</a></span>&#160;<span class="preprocessor">#define ATCA_CHIPMODE_I2C_ADDRESS_FLAG ((uint8_t)0x01)                 </span></div><div class="line"><a name="l00225"></a><span class="lineno"><a class="line" href="a00987.html#ga10795619d6fb78965b7e78996261f6cd">  225</a></span>&#160;<span class="preprocessor">#define ATCA_CHIPMODE_TTL_ENABLE_FLAG  ((uint8_t)0x02)                 </span></div><div class="line"><a name="l00226"></a><span class="lineno"><a class="line" href="a00987.html#ga814ad478cb05af339635633cbcd495b7">  226</a></span>&#160;<span class="preprocessor">#define ATCA_CHIPMODE_WATCHDOG_MASK    ((uint8_t)0x04)                 </span></div><div class="line"><a name="l00227"></a><span class="lineno"><a class="line" href="a00987.html#gab2c08e9a862fce29e741ef2b75918a8e">  227</a></span>&#160;<span class="preprocessor">#define ATCA_CHIPMODE_WATCHDOG_SHORT   ((uint8_t)0x00)                 </span></div><div class="line"><a name="l00228"></a><span class="lineno"><a class="line" href="a00987.html#ga9a089181beb38a1e5c5add58e96302bc">  228</a></span>&#160;<span class="preprocessor">#define ATCA_CHIPMODE_WATCHDOG_LONG    ((uint8_t)0x04)                 </span></div><div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="a00987.html#ga09ab7fb893534775d506020643820939">  229</a></span>&#160;<span class="preprocessor">#define ATCA_CHIPMODE_CLOCK_DIV_MASK   ((uint8_t)0xF8)                 </span></div><div class="line"><a name="l00230"></a><span class="lineno"><a class="line" href="a00987.html#gabe16121ea22ed08080997a2cfae1c125">  230</a></span>&#160;<span class="preprocessor">#define ATCA_CHIPMODE_CLOCK_DIV_M0     ((uint8_t)0x00)                 </span></div><div class="line"><a name="l00231"></a><span class="lineno"><a class="line" href="a00987.html#gaabaee03887c7e4403ac4936d9cde406e">  231</a></span>&#160;<span class="preprocessor">#define ATCA_CHIPMODE_CLOCK_DIV_M1     ((uint8_t)0x28)                 </span></div><div class="line"><a name="l00232"></a><span class="lineno"><a class="line" href="a00987.html#ga84f7e63b8711e799da259862b170fd75">  232</a></span>&#160;<span class="preprocessor">#define ATCA_CHIPMODE_CLOCK_DIV_M2     ((uint8_t)0x68)                 </span></div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00234"></a><span class="lineno"><a class="line" href="a00987.html#gad410516c4b4eb448a333eb3ed1f7b288">  234</a></span>&#160;<span class="preprocessor">#define ATCA_COUNT_SIZE             ((uint8_t)1)                       </span></div><div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="a00987.html#ga276faf364bbb0e27819842111e08842f">  235</a></span>&#160;<span class="preprocessor">#define ATCA_CRC_SIZE               ((uint8_t)2)                       </span></div><div class="line"><a name="l00236"></a><span class="lineno"><a class="line" href="a00987.html#gaa569255bc251cd90cb2d0f6b710164bc">  236</a></span>&#160;<span class="preprocessor">#define ATCA_PACKET_OVERHEAD        (ATCA_COUNT_SIZE + ATCA_CRC_SIZE)  </span></div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00238"></a><span class="lineno"><a class="line" href="a00987.html#ga07089e8e8b1aa335ddfd37e591f64ebb">  238</a></span>&#160;<span class="preprocessor">#define ATCA_PUB_KEY_SIZE           (64)                               </span></div><div class="line"><a name="l00239"></a><span class="lineno"><a class="line" href="a00987.html#ga3caf91c8e7ec183e0ad7b93dad9cb548">  239</a></span>&#160;<span class="preprocessor">#define ATCA_PRIV_KEY_SIZE          (32)                               </span></div><div class="line"><a name="l00240"></a><span class="lineno"><a class="line" href="a00987.html#ga56448f81a8d04c6871b3422c496bf8b6">  240</a></span>&#160;<span class="preprocessor">#define ATCA_SIG_SIZE               (64)                               </span></div><div class="line"><a name="l00241"></a><span class="lineno"><a class="line" href="a00987.html#ga66a410dde8f388c582495ba315284276">  241</a></span>&#160;<span class="preprocessor">#define ATCA_KEY_SIZE               (32)                               </span></div><div class="line"><a name="l00242"></a><span class="lineno"><a class="line" href="a00987.html#gaeb3783d1cdf4f9c1217d030bc0386fad">  242</a></span>&#160;<span class="preprocessor">#define RSA2048_KEY_SIZE            (256)                              </span></div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00244"></a><span class="lineno"><a class="line" href="a00987.html#ga0c738f2cc7bf063582c34188f85ddc3c">  244</a></span>&#160;<span class="preprocessor">#define ATCA_RSP_SIZE_MIN           ((uint8_t)4)                       </span></div><div class="line"><a name="l00245"></a><span class="lineno"><a class="line" href="a00987.html#ga15cc6f16cdb8f11b60981af7c3b15ef8">  245</a></span>&#160;<span class="preprocessor">#define ATCA_RSP_SIZE_4             ((uint8_t)7)                       </span></div><div class="line"><a name="l00246"></a><span class="lineno"><a class="line" href="a00987.html#ga67ca82b396385dd18790b48d731dfe15">  246</a></span>&#160;<span class="preprocessor">#define ATCA_RSP_SIZE_72            ((uint8_t)75)                      </span></div><div class="line"><a name="l00247"></a><span class="lineno"><a class="line" href="a00987.html#ga5b7ad7c3c75639352af5ad3b1298500c">  247</a></span>&#160;<span class="preprocessor">#define ATCA_RSP_SIZE_64            ((uint8_t)67)                      </span></div><div class="line"><a name="l00248"></a><span class="lineno"><a class="line" href="a00987.html#gafd812ab5b70a92a4d3a420c4f7106ac5">  248</a></span>&#160;<span class="preprocessor">#define ATCA_RSP_SIZE_32            ((uint8_t)35)                      </span></div><div class="line"><a name="l00249"></a><span class="lineno"><a class="line" href="a00987.html#ga0be09b502137446daedc43f1d3e85f86">  249</a></span>&#160;<span class="preprocessor">#define ATCA_RSP_SIZE_16            ((uint8_t)19)                      </span></div><div class="line"><a name="l00250"></a><span class="lineno"><a class="line" href="a00987.html#ga908aece3a9501eb14a70c2b24a3e4089">  250</a></span>&#160;<span class="preprocessor">#define ATCA_RSP_SIZE_MAX           ((uint8_t)75)                      </span></div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00252"></a><span class="lineno"><a class="line" href="a00987.html#gad742aca4fbd1b833423eeb7ce90a6743">  252</a></span>&#160;<span class="preprocessor">#define OUTNONCE_SIZE               (32)                               </span></div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;</div><div class="line"><a name="l00256"></a><span class="lineno"><a class="line" href="a00987.html#ga5da5f8005c1b2612b998afcbd823c716">  256</a></span>&#160;<span class="preprocessor">#define ATCA_KEY_ID_MAX             ((uint8_t)15)       </span></div><div class="line"><a name="l00257"></a><span class="lineno"><a class="line" href="a00987.html#gaa0eacfa4e596c3eb572753b7f5171276">  257</a></span>&#160;<span class="preprocessor">#define ATCA_OTP_BLOCK_MAX          ((uint8_t)1)        </span></div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00262"></a><span class="lineno"><a class="line" href="a00987.html#ga0aac7fbfd425112b4b1e922876532a9e">  262</a></span>&#160;<span class="preprocessor">#define ATCA_COUNT_IDX              (0)     </span></div><div class="line"><a name="l00263"></a><span class="lineno"><a class="line" href="a00987.html#ga15c3e02dd629f85722f4b74e61f3adca">  263</a></span>&#160;<span class="preprocessor">#define ATCA_OPCODE_IDX             (1)     </span></div><div class="line"><a name="l00264"></a><span class="lineno"><a class="line" href="a00987.html#ga090c04fed9d153a97fb77195c7eb2f56">  264</a></span>&#160;<span class="preprocessor">#define ATCA_PARAM1_IDX             (2)     </span></div><div class="line"><a name="l00265"></a><span class="lineno"><a class="line" href="a00987.html#ga9e84a71fc7e3ba613779aeb8d740eb23">  265</a></span>&#160;<span class="preprocessor">#define ATCA_PARAM2_IDX             (3)     </span></div><div class="line"><a name="l00266"></a><span class="lineno"><a class="line" href="a00987.html#ga756539af7bcadf33dd3a9b2f60763f7a">  266</a></span>&#160;<span class="preprocessor">#define ATCA_DATA_IDX               (5)     </span></div><div class="line"><a name="l00267"></a><span class="lineno"><a class="line" href="a00987.html#gabaaa930c2275599fcc3d83cfc02bfafe">  267</a></span>&#160;<span class="preprocessor">#define ATCA_RSP_DATA_IDX           (1)     </span></div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00272"></a><span class="lineno"><a class="line" href="a00987.html#gadd3796a1d4de55604283aef5a70f7945">  272</a></span>&#160;<span class="preprocessor">#define ATCA_ZONE_CONFIG                ((uint8_t)0x00)         </span></div><div class="line"><a name="l00273"></a><span class="lineno"><a class="line" href="a00987.html#ga547efc6fa3cb0501b2e53f80023dff7e">  273</a></span>&#160;<span class="preprocessor">#define ATCA_ZONE_OTP                   ((uint8_t)0x01)         </span></div><div class="line"><a name="l00274"></a><span class="lineno"><a class="line" href="a00987.html#ga4c65b241280290fae9fd4faa9d7a292b">  274</a></span>&#160;<span class="preprocessor">#define ATCA_ZONE_DATA                  ((uint8_t)0x02)         </span></div><div class="line"><a name="l00275"></a><span class="lineno"><a class="line" href="a00987.html#ga1d6d2f2713e845ec3b3bf465025d6858">  275</a></span>&#160;<span class="preprocessor">#define ATCA_ZONE_MASK                  ((uint8_t)0x03)         </span></div><div class="line"><a name="l00276"></a><span class="lineno"><a class="line" href="a00987.html#ga167bc588244395e98461008070fee8f3">  276</a></span>&#160;<span class="preprocessor">#define ATCA_ZONE_ENCRYPTED             ((uint8_t)0x40)         </span></div><div class="line"><a name="l00277"></a><span class="lineno"><a class="line" href="a00987.html#gaa32b46f2c058ee54377d0cbef1ec8764">  277</a></span>&#160;<span class="preprocessor">#define ATCA_ZONE_READWRITE_32          ((uint8_t)0x80)         </span></div><div class="line"><a name="l00278"></a><span class="lineno"><a class="line" href="a00987.html#ga32d53cee52cd042a31f1adc934ad7a5a">  278</a></span>&#160;<span class="preprocessor">#define ATCA_ADDRESS_MASK_CONFIG        (0x001F)                </span></div><div class="line"><a name="l00279"></a><span class="lineno"><a class="line" href="a00987.html#ga56e3f8d816e2068d80003fdee7d58763">  279</a></span>&#160;<span class="preprocessor">#define ATCA_ADDRESS_MASK_OTP           (0x000F)                </span></div><div class="line"><a name="l00280"></a><span class="lineno"><a class="line" href="a00987.html#ga579676fd500ded40bc49dc53231fa658">  280</a></span>&#160;<span class="preprocessor">#define ATCA_ADDRESS_MASK               (0x007F)                </span></div><div class="line"><a name="l00281"></a><span class="lineno"><a class="line" href="a00987.html#ga988fff8295c1914217b8543b614f556c">  281</a></span>&#160;<span class="preprocessor">#define ATCA_TEMPKEY_KEYID              (0xFFFF)                </span></div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00286"></a><span class="lineno"><a class="line" href="a00987.html#ga16f1550cc792fa205acef2106f2fcf54">  286</a></span>&#160;<span class="preprocessor">#define ATCA_B283_KEY_TYPE          0       </span></div><div class="line"><a name="l00287"></a><span class="lineno"><a class="line" href="a00987.html#gaac4e75cf70cf0cf946216ffefaf65525">  287</a></span>&#160;<span class="preprocessor">#define ATCA_K283_KEY_TYPE          1       </span></div><div class="line"><a name="l00288"></a><span class="lineno"><a class="line" href="a00987.html#ga6e53cd97c61a185ca397ebed8dc3edcb">  288</a></span>&#160;<span class="preprocessor">#define ATCA_P256_KEY_TYPE          4       </span></div><div class="line"><a name="l00289"></a><span class="lineno"><a class="line" href="a00987.html#ga8335b06c5f49c384e2c2f31861865a54">  289</a></span>&#160;<span class="preprocessor">#define ATCA_AES_KEY_TYPE           6       </span></div><div class="line"><a name="l00290"></a><span class="lineno"><a class="line" href="a00987.html#gad325831ee2326885795706efd7b3b00e">  290</a></span>&#160;<span class="preprocessor">#define ATCA_SHA_KEY_TYPE           7       </span></div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00295"></a><span class="lineno"><a class="line" href="a00987.html#ga890e2e40916e88caf596cff43be8ab23">  295</a></span>&#160;<span class="preprocessor">#define AES_MODE_IDX                ATCA_PARAM1_IDX         </span></div><div class="line"><a name="l00296"></a><span class="lineno"><a class="line" href="a00987.html#ga2809c87d994c49b53e039f752834fc97">  296</a></span>&#160;<span class="preprocessor">#define AES_KEYID_IDX               ATCA_PARAM2_IDX         </span></div><div class="line"><a name="l00297"></a><span class="lineno"><a class="line" href="a00987.html#gafabb67121c9c58fac9829287b55a2389">  297</a></span>&#160;<span class="preprocessor">#define AES_INPUT_IDX               ATCA_DATA_IDX           </span></div><div class="line"><a name="l00298"></a><span class="lineno"><a class="line" href="a00987.html#ga72cc5ecbdfa169d282776461ce48fda6">  298</a></span>&#160;<span class="preprocessor">#define AES_COUNT                   (23)                    </span></div><div class="line"><a name="l00299"></a><span class="lineno"><a class="line" href="a00987.html#ga7b2f5fb4edfbf4cb719aedbd7215b863">  299</a></span>&#160;<span class="preprocessor">#define AES_MODE_MASK               ((uint8_t)0xC7)         </span></div><div class="line"><a name="l00300"></a><span class="lineno"><a class="line" href="a00987.html#gaf54068dbf6ecb7bf8b1881caa0f3b89f">  300</a></span>&#160;<span class="preprocessor">#define AES_MODE_KEY_BLOCK_MASK     ((uint8_t)0xC0)         </span></div><div class="line"><a name="l00301"></a><span class="lineno"><a class="line" href="a00987.html#ga62c9e80674303aea5f92d76c92d30d2b">  301</a></span>&#160;<span class="preprocessor">#define AES_MODE_OP_MASK            ((uint8_t)0x07)         </span></div><div class="line"><a name="l00302"></a><span class="lineno"><a class="line" href="a00987.html#ga5ebee4d7d2d30a88ded25f9a6feecc52">  302</a></span>&#160;<span class="preprocessor">#define AES_MODE_ENCRYPT            ((uint8_t)0x00)         </span></div><div class="line"><a name="l00303"></a><span class="lineno"><a class="line" href="a00987.html#ga01cd269d08661e645b4caee850424130">  303</a></span>&#160;<span class="preprocessor">#define AES_MODE_DECRYPT            ((uint8_t)0x01)         </span></div><div class="line"><a name="l00304"></a><span class="lineno"><a class="line" href="a00987.html#ga34ec73cf7504b560883a5d192fe88793">  304</a></span>&#160;<span class="preprocessor">#define AES_MODE_GFM                ((uint8_t)0x03)         </span></div><div class="line"><a name="l00305"></a><span class="lineno"><a class="line" href="a00987.html#gabbbbd4cd4cc05e2ea023f059676aa37e">  305</a></span>&#160;<span class="preprocessor">#define AES_MODE_KEY_BLOCK_POS      (6)                     </span></div><div class="line"><a name="l00306"></a><span class="lineno"><a class="line" href="a00987.html#ga8cbce00b91b0ddfb3264c9c367a3699a">  306</a></span>&#160;<span class="preprocessor">#define AES_DATA_SIZE               (16)                    </span></div><div class="line"><a name="l00307"></a><span class="lineno"><a class="line" href="a00987.html#gab24f797b7c19e899ef753d9901850e44">  307</a></span>&#160;<span class="preprocessor">#define AES_RSP_SIZE                ATCA_RSP_SIZE_16        </span></div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00312"></a><span class="lineno"><a class="line" href="a00987.html#gae757542e1c4d4815e1dc8db034dca476">  312</a></span>&#160;<span class="preprocessor">#define CHECKMAC_MODE_IDX                   ATCA_PARAM1_IDX     </span></div><div class="line"><a name="l00313"></a><span class="lineno"><a class="line" href="a00987.html#ga4203bbb296cd67d035066979657cf979">  313</a></span>&#160;<span class="preprocessor">#define CHECKMAC_KEYID_IDX                  ATCA_PARAM2_IDX     </span></div><div class="line"><a name="l00314"></a><span class="lineno"><a class="line" href="a00987.html#ga0f2c0b2e264a88b766811fe4ea0de88f">  314</a></span>&#160;<span class="preprocessor">#define CHECKMAC_CLIENT_CHALLENGE_IDX       ATCA_DATA_IDX       </span></div><div class="line"><a name="l00315"></a><span class="lineno"><a class="line" href="a00987.html#ga170c911bfe1a20e3572bdc5c2cd80c9d">  315</a></span>&#160;<span class="preprocessor">#define CHECKMAC_CLIENT_RESPONSE_IDX        (37)                </span></div><div class="line"><a name="l00316"></a><span class="lineno"><a class="line" href="a00987.html#ga1ba2ec2d321b3f90f53c02c7fb9711f2">  316</a></span>&#160;<span class="preprocessor">#define CHECKMAC_DATA_IDX                   (69)                </span></div><div class="line"><a name="l00317"></a><span class="lineno"><a class="line" href="a00987.html#ga4c998ee3d596f3006a4488bd8657df33">  317</a></span>&#160;<span class="preprocessor">#define CHECKMAC_COUNT                      (84)                </span></div><div class="line"><a name="l00318"></a><span class="lineno"><a class="line" href="a00987.html#gaaabcd1e4afb29088a17f7e87e7136e24">  318</a></span>&#160;<span class="preprocessor">#define CHECKMAC_MODE_CHALLENGE             ((uint8_t)0x00)     </span></div><div class="line"><a name="l00319"></a><span class="lineno"><a class="line" href="a00987.html#ga40d926e0e037fc8bb265bb19f57e5d1a">  319</a></span>&#160;<span class="preprocessor">#define CHECKMAC_MODE_BLOCK2_TEMPKEY        ((uint8_t)0x01)     </span></div><div class="line"><a name="l00320"></a><span class="lineno"><a class="line" href="a00987.html#ga9088fc1b89c3ca9b58901de000d8d55d">  320</a></span>&#160;<span class="preprocessor">#define CHECKMAC_MODE_BLOCK1_TEMPKEY        ((uint8_t)0x02)     </span></div><div class="line"><a name="l00321"></a><span class="lineno"><a class="line" href="a00987.html#gac3ca4e46c6a0fb69ba0dfa5fe88ed9ad">  321</a></span>&#160;<span class="preprocessor">#define CHECKMAC_MODE_SOURCE_FLAG_MATCH     ((uint8_t)0x04)     </span></div><div class="line"><a name="l00322"></a><span class="lineno"><a class="line" href="a00987.html#gabeef4ff866116f4e17a6c3ad94b0a286">  322</a></span>&#160;<span class="preprocessor">#define CHECKMAC_MODE_INCLUDE_OTP_64        ((uint8_t)0x20)     </span></div><div class="line"><a name="l00323"></a><span class="lineno"><a class="line" href="a00987.html#ga67e74cb132024711cf064ff98021d71f">  323</a></span>&#160;<span class="preprocessor">#define CHECKMAC_MODE_MASK                  ((uint8_t)0x27)     </span></div><div class="line"><a name="l00324"></a><span class="lineno"><a class="line" href="a00987.html#ga3c7444c099cf0f89f754fd3cbec77bf4">  324</a></span>&#160;<span class="preprocessor">#define CHECKMAC_CLIENT_CHALLENGE_SIZE      (32)                </span></div><div class="line"><a name="l00325"></a><span class="lineno"><a class="line" href="a00987.html#ga93cb0fdfc89b69cb1c4670f30288f2ad">  325</a></span>&#160;<span class="preprocessor">#define CHECKMAC_CLIENT_RESPONSE_SIZE       (32)                </span></div><div class="line"><a name="l00326"></a><span class="lineno"><a class="line" href="a00987.html#ga7c365741639a5c7dc29267a130e8d827">  326</a></span>&#160;<span class="preprocessor">#define CHECKMAC_OTHER_DATA_SIZE            (13)                </span></div><div class="line"><a name="l00327"></a><span class="lineno"><a class="line" href="a00987.html#gad3d431e17094b6690d443e0a038da9e2">  327</a></span>&#160;<span class="preprocessor">#define CHECKMAC_CLIENT_COMMAND_SIZE        (4)                 </span></div><div class="line"><a name="l00328"></a><span class="lineno"><a class="line" href="a00987.html#ga09b26b691e29966bcec1513edf819efe">  328</a></span>&#160;<span class="preprocessor">#define CHECKMAC_CMD_MATCH                  (0)                 </span></div><div class="line"><a name="l00329"></a><span class="lineno"><a class="line" href="a00987.html#ga1db673cb318ec36ebd0c9c1a5ce301ad">  329</a></span>&#160;<span class="preprocessor">#define CHECKMAC_CMD_MISMATCH               (1)                 </span></div><div class="line"><a name="l00330"></a><span class="lineno"><a class="line" href="a00987.html#gaa44ecaa440ab845d5939333171476adf">  330</a></span>&#160;<span class="preprocessor">#define CHECKMAC_RSP_SIZE                   ATCA_RSP_SIZE_MIN   </span></div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00335"></a><span class="lineno"><a class="line" href="a00987.html#ga20f86d5c7f97f2513eebddce69917fbf">  335</a></span>&#160;<span class="preprocessor">#define COUNTER_COUNT                       ATCA_CMD_SIZE_MIN</span></div><div class="line"><a name="l00336"></a><span class="lineno"><a class="line" href="a00987.html#ga83a00fa1769c54aeb5ad02bdfba5b3e7">  336</a></span>&#160;<span class="preprocessor">#define COUNTER_MODE_IDX                    ATCA_PARAM1_IDX         </span></div><div class="line"><a name="l00337"></a><span class="lineno"><a class="line" href="a00987.html#ga269bd52a7856116ebce13c1072f56d9e">  337</a></span>&#160;<span class="preprocessor">#define COUNTER_KEYID_IDX                   ATCA_PARAM2_IDX         </span></div><div class="line"><a name="l00338"></a><span class="lineno"><a class="line" href="a00987.html#ga7b90ca417a76facaeec91d8f2c10f860">  338</a></span>&#160;<span class="preprocessor">#define COUNTER_MODE_MASK                   ((uint8_t)0x01)         </span></div><div class="line"><a name="l00339"></a><span class="lineno"><a class="line" href="a00987.html#gabc722de99f444668d09e3815fcc78400">  339</a></span>&#160;<span class="preprocessor">#define COUNTER_MAX_VALUE                   ((uint32_t)2097151)     </span></div><div class="line"><a name="l00340"></a><span class="lineno"><a class="line" href="a00987.html#ga4e3355c5ab7c48cfe466c9374ccc698e">  340</a></span>&#160;<span class="preprocessor">#define COUNTER_MODE_READ                   ((uint8_t)0x00)         </span></div><div class="line"><a name="l00341"></a><span class="lineno"><a class="line" href="a00987.html#gaadb200c87d6dedb5768eeb8395e697c2">  341</a></span>&#160;<span class="preprocessor">#define COUNTER_MODE_INCREMENT              ((uint8_t)0x01)         </span></div><div class="line"><a name="l00342"></a><span class="lineno"><a class="line" href="a00987.html#ga66287a8b6f625f866b5cecc4845993ed">  342</a></span>&#160;<span class="preprocessor">#define COUNTER_RSP_SIZE                    ATCA_RSP_SIZE_4         </span></div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00347"></a><span class="lineno"><a class="line" href="a00987.html#ga3495c2fd81985342858bac47300bcdc8">  347</a></span>&#160;<span class="preprocessor">#define DERIVE_KEY_RANDOM_IDX           ATCA_PARAM1_IDX     </span></div><div class="line"><a name="l00348"></a><span class="lineno"><a class="line" href="a00987.html#ga7216bb6f51f67f09e5372c7f731bf23a">  348</a></span>&#160;<span class="preprocessor">#define DERIVE_KEY_TARGETKEY_IDX        ATCA_PARAM2_IDX     </span></div><div class="line"><a name="l00349"></a><span class="lineno"><a class="line" href="a00987.html#gac3f89b5db216fd58ae2de3ebd52e26c5">  349</a></span>&#160;<span class="preprocessor">#define DERIVE_KEY_MAC_IDX              ATCA_DATA_IDX       </span></div><div class="line"><a name="l00350"></a><span class="lineno"><a class="line" href="a00987.html#ga3a3d3289c719d81f95b3d025a2564c9f">  350</a></span>&#160;<span class="preprocessor">#define DERIVE_KEY_COUNT_SMALL          ATCA_CMD_SIZE_MIN   </span></div><div class="line"><a name="l00351"></a><span class="lineno"><a class="line" href="a00987.html#gac6d810ee00947694d9b95d95db0b2f3c">  351</a></span>&#160;<span class="preprocessor">#define DERIVE_KEY_MODE                 ((uint8_t)0x04)     </span></div><div class="line"><a name="l00352"></a><span class="lineno"><a class="line" href="a00987.html#gac0386500d37b5502158a62b8d864580f">  352</a></span>&#160;<span class="preprocessor">#define DERIVE_KEY_COUNT_LARGE          (39)                </span></div><div class="line"><a name="l00353"></a><span class="lineno"><a class="line" href="a00987.html#gad6f89d1bb03ed8d84e230bedca57ddd9">  353</a></span>&#160;<span class="preprocessor">#define DERIVE_KEY_RANDOM_FLAG          ((uint8_t)4)        </span></div><div class="line"><a name="l00354"></a><span class="lineno"><a class="line" href="a00987.html#gaffa79c933fa76585479228b15c2cbc83">  354</a></span>&#160;<span class="preprocessor">#define DERIVE_KEY_MAC_SIZE             (32)                </span></div><div class="line"><a name="l00355"></a><span class="lineno"><a class="line" href="a00987.html#ga766a94a7e38b558e1165b24de78d21db">  355</a></span>&#160;<span class="preprocessor">#define DERIVE_KEY_RSP_SIZE             ATCA_RSP_SIZE_MIN   </span></div><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00360"></a><span class="lineno"><a class="line" href="a00987.html#ga928b142d4f3727104100dee0d0330f83">  360</a></span>&#160;<span class="preprocessor">#define ECDH_PREFIX_MODE                    ((uint8_t)0x00)</span></div><div class="line"><a name="l00361"></a><span class="lineno"><a class="line" href="a00987.html#gaf8ad6785828f72b793fb4452f3cb6698">  361</a></span>&#160;<span class="preprocessor">#define ECDH_COUNT                          (ATCA_CMD_SIZE_MIN + ATCA_PUB_KEY_SIZE)</span></div><div class="line"><a name="l00362"></a><span class="lineno"><a class="line" href="a00987.html#ga7b24dc2030441b0bf952d8c297b22a41">  362</a></span>&#160;<span class="preprocessor">#define ECDH_MODE_SOURCE_MASK               ((uint8_t)0x01)</span></div><div class="line"><a name="l00363"></a><span class="lineno"><a class="line" href="a00987.html#gae53c5f9d3aaa1b75dd1d0ffa3ab861d3">  363</a></span>&#160;<span class="preprocessor">#define ECDH_MODE_SOURCE_EEPROM_SLOT        ((uint8_t)0x00)</span></div><div class="line"><a name="l00364"></a><span class="lineno"><a class="line" href="a00987.html#ga9bf558eb7c48b79f3df382c3ec7d454d">  364</a></span>&#160;<span class="preprocessor">#define ECDH_MODE_SOURCE_TEMPKEY            ((uint8_t)0x01)</span></div><div class="line"><a name="l00365"></a><span class="lineno"><a class="line" href="a00987.html#ga2b2c07254f098dc8f8d87f2e09703adb">  365</a></span>&#160;<span class="preprocessor">#define ECDH_MODE_OUTPUT_MASK               ((uint8_t)0x02)</span></div><div class="line"><a name="l00366"></a><span class="lineno"><a class="line" href="a00987.html#gaa56ce725d85dcfbf7c217a748ca0a8b1">  366</a></span>&#160;<span class="preprocessor">#define ECDH_MODE_OUTPUT_CLEAR              ((uint8_t)0x00)</span></div><div class="line"><a name="l00367"></a><span class="lineno"><a class="line" href="a00987.html#ga0ea0e257512fa047f26910c6605a9769">  367</a></span>&#160;<span class="preprocessor">#define ECDH_MODE_OUTPUT_ENC                ((uint8_t)0x02)</span></div><div class="line"><a name="l00368"></a><span class="lineno"><a class="line" href="a00987.html#gafb0b0b4ae54efabd5bd3c906935620ca">  368</a></span>&#160;<span class="preprocessor">#define ECDH_MODE_COPY_MASK                 ((uint8_t)0x0C)</span></div><div class="line"><a name="l00369"></a><span class="lineno"><a class="line" href="a00987.html#ga0e360558cd7cb842198cd8cd5d7a3da6">  369</a></span>&#160;<span class="preprocessor">#define ECDH_MODE_COPY_COMPATIBLE           ((uint8_t)0x00)</span></div><div class="line"><a name="l00370"></a><span class="lineno"><a class="line" href="a00987.html#ga4abde1839cbeb254d79f1deac8d42c9e">  370</a></span>&#160;<span class="preprocessor">#define ECDH_MODE_COPY_EEPROM_SLOT          ((uint8_t)0x04)</span></div><div class="line"><a name="l00371"></a><span class="lineno"><a class="line" href="a00987.html#ga7e9ea268fbc8b0b5bb038ae30b5ec500">  371</a></span>&#160;<span class="preprocessor">#define ECDH_MODE_COPY_TEMP_KEY             ((uint8_t)0x08)</span></div><div class="line"><a name="l00372"></a><span class="lineno"><a class="line" href="a00987.html#ga4f6024d4d7e0fcd026fac40297db4c96">  372</a></span>&#160;<span class="preprocessor">#define ECDH_MODE_COPY_OUTPUT_BUFFER        ((uint8_t)0x0C)</span></div><div class="line"><a name="l00373"></a><span class="lineno"><a class="line" href="a00987.html#gaa21e10945076d803129feb07946591f9">  373</a></span>&#160;<span class="preprocessor">#define ECDH_KEY_SIZE                       ATCA_BLOCK_SIZE     </span></div><div class="line"><a name="l00374"></a><span class="lineno"><a class="line" href="a00987.html#gaa667451bf2e061c3e76a7a8a5d8b86d4">  374</a></span>&#160;<span class="preprocessor">#define ECDH_RSP_SIZE                       ATCA_RSP_SIZE_64    </span></div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00379"></a><span class="lineno"><a class="line" href="a00987.html#gab79b57111a49362bd51922813cb84355">  379</a></span>&#160;<span class="preprocessor">#define GENDIG_ZONE_IDX             ATCA_PARAM1_IDX     </span></div><div class="line"><a name="l00380"></a><span class="lineno"><a class="line" href="a00987.html#gac2d5b5de26d0318ba6db3ad1055eb6ec">  380</a></span>&#160;<span class="preprocessor">#define GENDIG_KEYID_IDX            ATCA_PARAM2_IDX     </span></div><div class="line"><a name="l00381"></a><span class="lineno"><a class="line" href="a00987.html#gac101f854026596231715eca664550e36">  381</a></span>&#160;<span class="preprocessor">#define GENDIG_DATA_IDX             ATCA_DATA_IDX       </span></div><div class="line"><a name="l00382"></a><span class="lineno"><a class="line" href="a00987.html#ga235eb9557fa074bf152f9ce9c5844058">  382</a></span>&#160;<span class="preprocessor">#define GENDIG_COUNT                ATCA_CMD_SIZE_MIN   </span></div><div class="line"><a name="l00383"></a><span class="lineno"><a class="line" href="a00987.html#ga9cab0c5dd2e3796497a5237f101f19e0">  383</a></span>&#160;<span class="preprocessor">#define GENDIG_ZONE_CONFIG          ((uint8_t)0)        </span></div><div class="line"><a name="l00384"></a><span class="lineno"><a class="line" href="a00987.html#gaee95b219cf932dfedb3a3c5e23d01a9d">  384</a></span>&#160;<span class="preprocessor">#define GENDIG_ZONE_OTP             ((uint8_t)1)        </span></div><div class="line"><a name="l00385"></a><span class="lineno"><a class="line" href="a00987.html#gabc21880360bdce990ad724fa7a7d9bf0">  385</a></span>&#160;<span class="preprocessor">#define GENDIG_ZONE_DATA            ((uint8_t)2)        </span></div><div class="line"><a name="l00386"></a><span class="lineno"><a class="line" href="a00987.html#ga49923a8835f64294a5e9b3660c80dc7e">  386</a></span>&#160;<span class="preprocessor">#define GENDIG_ZONE_SHARED_NONCE    ((uint8_t)3)        </span></div><div class="line"><a name="l00387"></a><span class="lineno"><a class="line" href="a00987.html#ga84f07835d69fed7484299c78f4971a3e">  387</a></span>&#160;<span class="preprocessor">#define GENDIG_ZONE_COUNTER         ((uint8_t)4)        </span></div><div class="line"><a name="l00388"></a><span class="lineno"><a class="line" href="a00987.html#gaba61a1bd245d7471e59a39577498065b">  388</a></span>&#160;<span class="preprocessor">#define GENDIG_ZONE_KEY_CONFIG      ((uint8_t)5)        </span></div><div class="line"><a name="l00389"></a><span class="lineno"><a class="line" href="a00987.html#ga2c26247a084a027f06a2aaf692313f12">  389</a></span>&#160;<span class="preprocessor">#define GENDIG_RSP_SIZE             ATCA_RSP_SIZE_MIN   </span></div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00394"></a><span class="lineno"><a class="line" href="a00987.html#gaf120353f5e8e159eaa9c930555b159d5">  394</a></span>&#160;<span class="preprocessor">#define GENKEY_MODE_IDX             ATCA_PARAM1_IDX         </span></div><div class="line"><a name="l00395"></a><span class="lineno"><a class="line" href="a00987.html#ga5cacc01be37cebf35e300be96893477e">  395</a></span>&#160;<span class="preprocessor">#define GENKEY_KEYID_IDX            ATCA_PARAM2_IDX         </span></div><div class="line"><a name="l00396"></a><span class="lineno"><a class="line" href="a00987.html#ga9163acda5dd0653f40b6ad445f2c972d">  396</a></span>&#160;<span class="preprocessor">#define GENKEY_DATA_IDX             (5)                     </span></div><div class="line"><a name="l00397"></a><span class="lineno"><a class="line" href="a00987.html#gab6782a07fce203169aba6dd32f8ab123">  397</a></span>&#160;<span class="preprocessor">#define GENKEY_COUNT                ATCA_CMD_SIZE_MIN       </span></div><div class="line"><a name="l00398"></a><span class="lineno"><a class="line" href="a00987.html#ga07289de41178ecfb6392da31e31e27c3">  398</a></span>&#160;<span class="preprocessor">#define GENKEY_COUNT_DATA           (10)                    </span></div><div class="line"><a name="l00399"></a><span class="lineno"><a class="line" href="a00987.html#ga62644ffb962c56fbea154526a2a84b40">  399</a></span>&#160;<span class="preprocessor">#define GENKEY_OTHER_DATA_SIZE      (3)                     </span></div><div class="line"><a name="l00400"></a><span class="lineno"><a class="line" href="a00987.html#gaa3984c137090a2d103b2089c7ac31642">  400</a></span>&#160;<span class="preprocessor">#define GENKEY_MODE_MASK            ((uint8_t)0x1C)         </span></div><div class="line"><a name="l00401"></a><span class="lineno"><a class="line" href="a00987.html#gadc25fc4bebaac1582bb57d791f72356d">  401</a></span>&#160;<span class="preprocessor">#define GENKEY_MODE_PRIVATE         ((uint8_t)0x04)         </span></div><div class="line"><a name="l00402"></a><span class="lineno"><a class="line" href="a00987.html#ga03e556ba7849f28ee8c58df8921cba66">  402</a></span>&#160;<span class="preprocessor">#define GENKEY_MODE_PUBLIC          ((uint8_t)0x00)         </span></div><div class="line"><a name="l00403"></a><span class="lineno"><a class="line" href="a00987.html#ga609531b6e844f5a9eebd7c4dcd869b16">  403</a></span>&#160;<span class="preprocessor">#define GENKEY_MODE_DIGEST          ((uint8_t)0x08)         </span></div><div class="line"><a name="l00404"></a><span class="lineno"><a class="line" href="a00987.html#ga8d9a1e331d54bffb36f7b4e97af5d161">  404</a></span>&#160;<span class="preprocessor">#define GENKEY_MODE_PUBKEY_DIGEST   ((uint8_t)0x10)         </span></div><div class="line"><a name="l00405"></a><span class="lineno"><a class="line" href="a00987.html#gad5b1ead29f3ce3cee52d106af531ab86">  405</a></span>&#160;<span class="preprocessor">#define GENKEY_PRIVATE_TO_TEMPKEY   ((uint16_t)0xFFFF)      </span></div><div class="line"><a name="l00406"></a><span class="lineno"><a class="line" href="a00987.html#ga0543a644422ffc7460eeeb78799bde16">  406</a></span>&#160;<span class="preprocessor">#define GENKEY_RSP_SIZE_SHORT       ATCA_RSP_SIZE_MIN       </span></div><div class="line"><a name="l00407"></a><span class="lineno"><a class="line" href="a00987.html#ga08e8a80be2717ece7c5ed5cc0a27fbab">  407</a></span>&#160;<span class="preprocessor">#define GENKEY_RSP_SIZE_LONG        ATCA_RSP_SIZE_64        </span></div><div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00412"></a><span class="lineno"><a class="line" href="a00987.html#gadf58a677811566e8446870523bb65850">  412</a></span>&#160;<span class="preprocessor">#define HMAC_MODE_IDX               ATCA_PARAM1_IDX     </span></div><div class="line"><a name="l00413"></a><span class="lineno"><a class="line" href="a00987.html#ga23673926f1dd2464bd20f6512985d855">  413</a></span>&#160;<span class="preprocessor">#define HMAC_KEYID_IDX              ATCA_PARAM2_IDX     </span></div><div class="line"><a name="l00414"></a><span class="lineno"><a class="line" href="a00987.html#ga041d4cd845319ea0a693a1c4008b2a06">  414</a></span>&#160;<span class="preprocessor">#define HMAC_COUNT                  ATCA_CMD_SIZE_MIN   </span></div><div class="line"><a name="l00415"></a><span class="lineno"><a class="line" href="a00987.html#ga08326ee33be4faaec3be800e80c1cc17">  415</a></span>&#160;<span class="preprocessor">#define HMAC_MODE_FLAG_TK_RAND      ((uint8_t)0x00)     </span></div><div class="line"><a name="l00416"></a><span class="lineno"><a class="line" href="a00987.html#gac3b1177210ba941afa527bacbcfd4fab">  416</a></span>&#160;<span class="preprocessor">#define HMAC_MODE_FLAG_TK_NORAND    ((uint8_t)0x04)     </span></div><div class="line"><a name="l00417"></a><span class="lineno"><a class="line" href="a00987.html#ga34be98ca6fb22f331eb62cfc4104ded6">  417</a></span>&#160;<span class="preprocessor">#define HMAC_MODE_FLAG_OTP88        ((uint8_t)0x10)     </span></div><div class="line"><a name="l00418"></a><span class="lineno"><a class="line" href="a00987.html#ga62261a1c6f121c296dce7e0f697c9a4a">  418</a></span>&#160;<span class="preprocessor">#define HMAC_MODE_FLAG_OTP64        ((uint8_t)0x20)     </span></div><div class="line"><a name="l00419"></a><span class="lineno"><a class="line" href="a00987.html#ga564f52346bfc03bdd50aa7d03974efe7">  419</a></span>&#160;<span class="preprocessor">#define HMAC_MODE_FLAG_FULLSN       ((uint8_t)0x40)     </span></div><div class="line"><a name="l00420"></a><span class="lineno"><a class="line" href="a00987.html#ga8250b0997534871fdd6ead1c3aa220ba">  420</a></span>&#160;<span class="preprocessor">#define HMAC_MODE_MASK              ((uint8_t)0x74)     </span></div><div class="line"><a name="l00421"></a><span class="lineno"><a class="line" href="a00987.html#gacd5976f898b9f67ea8e21df4e27fb712">  421</a></span>&#160;<span class="preprocessor">#define HMAC_DIGEST_SIZE            (32)                </span></div><div class="line"><a name="l00422"></a><span class="lineno"><a class="line" href="a00987.html#gadec1fd29e8c6b2f804fc4050778dafc8">  422</a></span>&#160;<span class="preprocessor">#define HMAC_RSP_SIZE               ATCA_RSP_SIZE_32    </span></div><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00427"></a><span class="lineno"><a class="line" href="a00987.html#ga9d72194dbe94bd2f5d3b0e9aa2dc85ac">  427</a></span>&#160;<span class="preprocessor">#define INFO_PARAM1_IDX             ATCA_PARAM1_IDX     </span></div><div class="line"><a name="l00428"></a><span class="lineno"><a class="line" href="a00987.html#ga09e4830c78dedfa2ce662e0fdbe430e3">  428</a></span>&#160;<span class="preprocessor">#define INFO_PARAM2_IDX             ATCA_PARAM2_IDX     </span></div><div class="line"><a name="l00429"></a><span class="lineno"><a class="line" href="a00987.html#gaee1a29942cf2b3637a65506dc6b5d4fe">  429</a></span>&#160;<span class="preprocessor">#define INFO_COUNT                  ATCA_CMD_SIZE_MIN   </span></div><div class="line"><a name="l00430"></a><span class="lineno"><a class="line" href="a00987.html#gae591dd29af805fc5b63e5b06d5e7c450">  430</a></span>&#160;<span class="preprocessor">#define INFO_MODE_REVISION          ((uint8_t)0x00)     </span></div><div class="line"><a name="l00431"></a><span class="lineno"><a class="line" href="a00987.html#ga6f746e9967643e3234727eaa5a0b274b">  431</a></span>&#160;<span class="preprocessor">#define INFO_MODE_KEY_VALID         ((uint8_t)0x01)     </span></div><div class="line"><a name="l00432"></a><span class="lineno"><a class="line" href="a00987.html#ga7432ca6b291e32e962fabaa6d604a8bc">  432</a></span>&#160;<span class="preprocessor">#define INFO_MODE_STATE             ((uint8_t)0x02)     </span></div><div class="line"><a name="l00433"></a><span class="lineno"><a class="line" href="a00987.html#ga30e8f8f4027e2137c11c2fb49b4c2aa6">  433</a></span>&#160;<span class="preprocessor">#define INFO_MODE_GPIO              ((uint8_t)0x03)     </span></div><div class="line"><a name="l00434"></a><span class="lineno"><a class="line" href="a00987.html#gac0fb0edb797b754a069e12931a001257">  434</a></span>&#160;<span class="preprocessor">#define INFO_MODE_VOL_KEY_PERMIT    ((uint8_t)0x04)     </span></div><div class="line"><a name="l00435"></a><span class="lineno"><a class="line" href="a00987.html#ga249c12b69d65f6c33568c78b9d9b127d">  435</a></span>&#160;<span class="preprocessor">#define INFO_MODE_MAX               ((uint8_t)0x03)     </span></div><div class="line"><a name="l00436"></a><span class="lineno"><a class="line" href="a00987.html#gad5b035b6f65f87b7fdf75f225a54ce35">  436</a></span>&#160;<span class="preprocessor">#define INFO_NO_STATE               ((uint8_t)0x00)     </span></div><div class="line"><a name="l00437"></a><span class="lineno"><a class="line" href="a00987.html#ga2b70682af491ce76c45505cabafcf9c0">  437</a></span>&#160;<span class="preprocessor">#define INFO_OUTPUT_STATE_MASK      ((uint8_t)0x01)     </span></div><div class="line"><a name="l00438"></a><span class="lineno"><a class="line" href="a00987.html#ga9cc740e22e15f08a8b90873a2b3b47e8">  438</a></span>&#160;<span class="preprocessor">#define INFO_DRIVER_STATE_MASK      ((uint8_t)0x02)     </span></div><div class="line"><a name="l00439"></a><span class="lineno"><a class="line" href="a00987.html#ga5dcc70feddb0b97c6fa779c6c3c819e6">  439</a></span>&#160;<span class="preprocessor">#define INFO_PARAM2_SET_LATCH_STATE ((uint16_t)0x0002)  </span></div><div class="line"><a name="l00440"></a><span class="lineno"><a class="line" href="a00987.html#gaae24f308513ed54fc7c41b39bc05760b">  440</a></span>&#160;<span class="preprocessor">#define INFO_PARAM2_LATCH_SET       ((uint16_t)0x0001)  </span></div><div class="line"><a name="l00441"></a><span class="lineno"><a class="line" href="a00987.html#ga027d5e8ae4a55db4ae52a41f3214c861">  441</a></span>&#160;<span class="preprocessor">#define INFO_PARAM2_LATCH_CLEAR     ((uint16_t)0x0000)  </span></div><div class="line"><a name="l00442"></a><span class="lineno"><a class="line" href="a00987.html#ga70457c61d44fbac0cb48727f53c39388">  442</a></span>&#160;<span class="preprocessor">#define INFO_SIZE                   ((uint8_t)0x04)     </span></div><div class="line"><a name="l00443"></a><span class="lineno"><a class="line" href="a00987.html#ga0c667e3f6590ac12726cbf4ad2b0f4f5">  443</a></span>&#160;<span class="preprocessor">#define INFO_RSP_SIZE               ATCA_RSP_SIZE_VAL   </span></div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00448"></a><span class="lineno"><a class="line" href="a00987.html#ga959e54d571acf81b608d5c6d535b0510">  448</a></span>&#160;<span class="preprocessor">#define KDF_MODE_IDX                     ATCA_PARAM1_IDX           </span></div><div class="line"><a name="l00449"></a><span class="lineno"><a class="line" href="a00987.html#gae814b4e63476d137bf226537cb2ff0fc">  449</a></span>&#160;<span class="preprocessor">#define KDF_KEYID_IDX                    ATCA_PARAM2_IDX           </span></div><div class="line"><a name="l00450"></a><span class="lineno"><a class="line" href="a00987.html#ga56306fca73ae0f43053787bafdac6a94">  450</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_IDX                  ATCA_DATA_IDX             </span></div><div class="line"><a name="l00451"></a><span class="lineno"><a class="line" href="a00987.html#ga2e025044ab9693b267e79f80e0a69cb1">  451</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_SIZE                 4                         </span></div><div class="line"><a name="l00452"></a><span class="lineno"><a class="line" href="a00987.html#ga7a57365768506315a6e3a6276508762c">  452</a></span>&#160;<span class="preprocessor">#define KDF_MESSAGE_IDX                  (ATCA_DATA_IDX + KDF_DETAILS_SIZE)</span></div><div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;</div><div class="line"><a name="l00454"></a><span class="lineno"><a class="line" href="a00987.html#gaddd73b0088cc98d40eaf8b3370f2fc8e">  454</a></span>&#160;<span class="preprocessor">#define KDF_MODE_SOURCE_MASK             ((uint8_t)0x03)           </span></div><div class="line"><a name="l00455"></a><span class="lineno"><a class="line" href="a00987.html#ga43cad9606d9b7c0e5875b1fa66108eb8">  455</a></span>&#160;<span class="preprocessor">#define KDF_MODE_SOURCE_TEMPKEY          ((uint8_t)0x00)           </span></div><div class="line"><a name="l00456"></a><span class="lineno"><a class="line" href="a00987.html#ga3785654ccbe309a87213aedb001ca39d">  456</a></span>&#160;<span class="preprocessor">#define KDF_MODE_SOURCE_TEMPKEY_UP       ((uint8_t)0x01)           </span></div><div class="line"><a name="l00457"></a><span class="lineno"><a class="line" href="a00987.html#ga3b69501fcc3e0cea0197fc0f6107916a">  457</a></span>&#160;<span class="preprocessor">#define KDF_MODE_SOURCE_SLOT             ((uint8_t)0x02)           </span></div><div class="line"><a name="l00458"></a><span class="lineno"><a class="line" href="a00987.html#gaa3f4cdb700e47737058c174a1f156707">  458</a></span>&#160;<span class="preprocessor">#define KDF_MODE_SOURCE_ALTKEYBUF        ((uint8_t)0x03)           </span></div><div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00460"></a><span class="lineno"><a class="line" href="a00987.html#ga97828be629e8f11561b58cb434c18b21">  460</a></span>&#160;<span class="preprocessor">#define KDF_MODE_TARGET_MASK             ((uint8_t)0x1C)           </span></div><div class="line"><a name="l00461"></a><span class="lineno"><a class="line" href="a00987.html#gabdbb7fc88ccf13d556dce6de3df9ce1b">  461</a></span>&#160;<span class="preprocessor">#define KDF_MODE_TARGET_TEMPKEY          ((uint8_t)0x00)           </span></div><div class="line"><a name="l00462"></a><span class="lineno"><a class="line" href="a00987.html#gad7e0df789060db2a9e8339972eac2482">  462</a></span>&#160;<span class="preprocessor">#define KDF_MODE_TARGET_TEMPKEY_UP       ((uint8_t)0x04)           </span></div><div class="line"><a name="l00463"></a><span class="lineno"><a class="line" href="a00987.html#ga05c0e401be347897d9573ba58492e570">  463</a></span>&#160;<span class="preprocessor">#define KDF_MODE_TARGET_SLOT             ((uint8_t)0x08)           </span></div><div class="line"><a name="l00464"></a><span class="lineno"><a class="line" href="a00987.html#gafeaf2094813c3184f0f128c37e3297dd">  464</a></span>&#160;<span class="preprocessor">#define KDF_MODE_TARGET_ALTKEYBUF        ((uint8_t)0x0C)           </span></div><div class="line"><a name="l00465"></a><span class="lineno"><a class="line" href="a00987.html#gafa19443ca4e054e38a7599c37575678d">  465</a></span>&#160;<span class="preprocessor">#define KDF_MODE_TARGET_OUTPUT           ((uint8_t)0x10)           </span></div><div class="line"><a name="l00466"></a><span class="lineno"><a class="line" href="a00987.html#ga28cccb87be4305fa9469c26b0ca341e8">  466</a></span>&#160;<span class="preprocessor">#define KDF_MODE_TARGET_OUTPUT_ENC       ((uint8_t)0x14)           </span></div><div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00468"></a><span class="lineno"><a class="line" href="a00987.html#ga90f529642e87edae132421b3777ec4b1">  468</a></span>&#160;<span class="preprocessor">#define KDF_MODE_ALG_MASK                ((uint8_t)0x60)           </span></div><div class="line"><a name="l00469"></a><span class="lineno"><a class="line" href="a00987.html#ga41ad765834ce2cf37241f79b80857f79">  469</a></span>&#160;<span class="preprocessor">#define KDF_MODE_ALG_PRF                 ((uint8_t)0x00)           </span></div><div class="line"><a name="l00470"></a><span class="lineno"><a class="line" href="a00987.html#gaee08925a21e8dbf05f8557617e3f610e">  470</a></span>&#160;<span class="preprocessor">#define KDF_MODE_ALG_AES                 ((uint8_t)0x20)           </span></div><div class="line"><a name="l00471"></a><span class="lineno"><a class="line" href="a00987.html#ga59b230043c3cd1fa0deafac6225238cb">  471</a></span>&#160;<span class="preprocessor">#define KDF_MODE_ALG_HKDF                ((uint8_t)0x40)           </span></div><div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00473"></a><span class="lineno"><a class="line" href="a00987.html#gaf42b60e97bdf4bf0338b8a5ce420fdc5">  473</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_PRF_KEY_LEN_MASK     ((uint32_t)0x00000003)    </span></div><div class="line"><a name="l00474"></a><span class="lineno"><a class="line" href="a00987.html#gaf83ceba3654b1b76e216402a023c1578">  474</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_PRF_KEY_LEN_16       ((uint32_t)0x00000000)    </span></div><div class="line"><a name="l00475"></a><span class="lineno"><a class="line" href="a00987.html#gaadcf0e639c6da291ddcb7fed49f1f967">  475</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_PRF_KEY_LEN_32       ((uint32_t)0x00000001)    </span></div><div class="line"><a name="l00476"></a><span class="lineno"><a class="line" href="a00987.html#gaae92bdb9d72ad6bd2193cbf0e672d46e">  476</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_PRF_KEY_LEN_48       ((uint32_t)0x00000002)    </span></div><div class="line"><a name="l00477"></a><span class="lineno"><a class="line" href="a00987.html#ga1519bbd506095c4db25aad15bbc0735b">  477</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_PRF_KEY_LEN_64       ((uint32_t)0x00000003)    </span></div><div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00479"></a><span class="lineno"><a class="line" href="a00987.html#ga32c642907f4f326893fb6fccfce18707">  479</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_PRF_TARGET_LEN_MASK  ((uint32_t)0x00000100)    </span></div><div class="line"><a name="l00480"></a><span class="lineno"><a class="line" href="a00987.html#gac049629a826435702055cc8279db76bb">  480</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_PRF_TARGET_LEN_32    ((uint32_t)0x00000000)    </span></div><div class="line"><a name="l00481"></a><span class="lineno"><a class="line" href="a00987.html#ga0b47a5e9928b7f3c91db64a9b80fde8b">  481</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_PRF_TARGET_LEN_64    ((uint32_t)0x00000100)    </span></div><div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00483"></a><span class="lineno"><a class="line" href="a00987.html#ga71bd7b920718c3bbf99d78eda569018c">  483</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_PRF_AEAD_MASK        ((uint32_t)0x00000600)    </span></div><div class="line"><a name="l00484"></a><span class="lineno"><a class="line" href="a00987.html#ga77402cc8f4efbba6119bd57717c34ce4">  484</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_PRF_AEAD_MODE0       ((uint32_t)0x00000000)    </span></div><div class="line"><a name="l00485"></a><span class="lineno"><a class="line" href="a00987.html#ga696c55d8590e9d1ac2571d6921f27573">  485</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_PRF_AEAD_MODE1       ((uint32_t)0x00000200)    </span></div><div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00487"></a><span class="lineno"><a class="line" href="a00987.html#ga77a516ab645b681ad7861d8b74e4a115">  487</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_AES_KEY_LOC_MASK     ((uint32_t)0x00000003)    </span></div><div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00489"></a><span class="lineno"><a class="line" href="a00987.html#gaa5b4cb5be95861466fff33fe0d5a9020">  489</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_HKDF_MSG_LOC_MASK    ((uint32_t)0x00000003)    </span></div><div class="line"><a name="l00490"></a><span class="lineno"><a class="line" href="a00987.html#ga8d5f52e7dbb1ea5308517365bbec87b5">  490</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_HKDF_MSG_LOC_SLOT    ((uint32_t)0x00000000)    </span></div><div class="line"><a name="l00491"></a><span class="lineno"><a class="line" href="a00987.html#gabae30386c46658676cf11de7bec27138">  491</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_HKDF_MSG_LOC_TEMPKEY ((uint32_t)0x00000001)    </span></div><div class="line"><a name="l00492"></a><span class="lineno"><a class="line" href="a00987.html#gae2b34b443ce2e0f285dd8d6f34f84d70">  492</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_HKDF_MSG_LOC_INPUT   ((uint32_t)0x00000002)    </span></div><div class="line"><a name="l00493"></a><span class="lineno"><a class="line" href="a00987.html#ga53650471a7eef96ce0ef00cb6b8a6a9b">  493</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_HKDF_MSG_LOC_IV      ((uint32_t)0x00000003)    </span></div><div class="line"><a name="l00494"></a><span class="lineno"><a class="line" href="a00987.html#gae16e61d55b371f9c5e31f08f680de609">  494</a></span>&#160;<span class="preprocessor">#define KDF_DETAILS_HKDF_ZERO_KEY        ((uint32_t)0x00000004)    </span></div><div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00499"></a><span class="lineno"><a class="line" href="a00987.html#gaa72601de2238c09393f120f68abf66a4">  499</a></span>&#160;<span class="preprocessor">#define LOCK_ZONE_IDX               ATCA_PARAM1_IDX     </span></div><div class="line"><a name="l00500"></a><span class="lineno"><a class="line" href="a00987.html#ga6bd6b85614792b8dabb6432f7a48151e">  500</a></span>&#160;<span class="preprocessor">#define LOCK_SUMMARY_IDX            ATCA_PARAM2_IDX     </span></div><div class="line"><a name="l00501"></a><span class="lineno"><a class="line" href="a00987.html#ga8a5cce3cbccf46b91c8065559ad1a082">  501</a></span>&#160;<span class="preprocessor">#define LOCK_COUNT                  ATCA_CMD_SIZE_MIN   </span></div><div class="line"><a name="l00502"></a><span class="lineno"><a class="line" href="a00987.html#gaabbc0da0b4fd66c3aa75ae0cc3a62e39">  502</a></span>&#160;<span class="preprocessor">#define LOCK_ZONE_CONFIG            ((uint8_t)0x00)     </span></div><div class="line"><a name="l00503"></a><span class="lineno"><a class="line" href="a00987.html#ga1dedbfae86a6c38085070160696e00bb">  503</a></span>&#160;<span class="preprocessor">#define LOCK_ZONE_DATA              ((uint8_t)0x01)     </span></div><div class="line"><a name="l00504"></a><span class="lineno"><a class="line" href="a00987.html#gaf5a93b147dd08b111b348edd1bc82fa5">  504</a></span>&#160;<span class="preprocessor">#define LOCK_ZONE_DATA_SLOT         ((uint8_t)0x02)     </span></div><div class="line"><a name="l00505"></a><span class="lineno"><a class="line" href="a00987.html#ga29b582e5069538ee92f5bcd6d1356255">  505</a></span>&#160;<span class="preprocessor">#define LOCK_ZONE_NO_CRC            ((uint8_t)0x80)     </span></div><div class="line"><a name="l00506"></a><span class="lineno"><a class="line" href="a00987.html#ga71b3c35d021e0ac507fdd6cd9538467f">  506</a></span>&#160;<span class="preprocessor">#define LOCK_ZONE_MASK              (0xBF)              </span></div><div class="line"><a name="l00507"></a><span class="lineno"><a class="line" href="a00987.html#ga54155caf79f004ccf0a875cf3a0ef05b">  507</a></span>&#160;<span class="preprocessor">#define ATCA_UNLOCKED               (0x55)              </span></div><div class="line"><a name="l00508"></a><span class="lineno"><a class="line" href="a00987.html#gaf397e129e4581162f91873358b5f1538">  508</a></span>&#160;<span class="preprocessor">#define ATCA_LOCKED                 (0x00)              </span></div><div class="line"><a name="l00509"></a><span class="lineno"><a class="line" href="a00987.html#ga773dce573d9ff453d2f49aa7fc48e210">  509</a></span>&#160;<span class="preprocessor">#define LOCK_RSP_SIZE               ATCA_RSP_SIZE_MIN   </span></div><div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00514"></a><span class="lineno"><a class="line" href="a00987.html#ga4b1f89e4c4a24c058fddb3d936e76017">  514</a></span>&#160;<span class="preprocessor">#define MAC_MODE_IDX                    ATCA_PARAM1_IDX         </span></div><div class="line"><a name="l00515"></a><span class="lineno"><a class="line" href="a00987.html#gadb6b7f50e3d8af5d2de64f3bd4c83332">  515</a></span>&#160;<span class="preprocessor">#define MAC_KEYID_IDX                   ATCA_PARAM2_IDX         </span></div><div class="line"><a name="l00516"></a><span class="lineno"><a class="line" href="a00987.html#ga427e37c74bad23b251deb2274de6d703">  516</a></span>&#160;<span class="preprocessor">#define MAC_CHALLENGE_IDX               ATCA_DATA_IDX           </span></div><div class="line"><a name="l00517"></a><span class="lineno"><a class="line" href="a00987.html#ga94d9bf52f1a6c7af3943eb92dd3967ef">  517</a></span>&#160;<span class="preprocessor">#define MAC_COUNT_SHORT                 ATCA_CMD_SIZE_MIN       </span></div><div class="line"><a name="l00518"></a><span class="lineno"><a class="line" href="a00987.html#gaa466dfdf174c134a11f578d1731990ef">  518</a></span>&#160;<span class="preprocessor">#define MAC_COUNT_LONG                  (39)                    </span></div><div class="line"><a name="l00519"></a><span class="lineno"><a class="line" href="a00987.html#ga876298788a9270561dc279b7d4c92cb8">  519</a></span>&#160;<span class="preprocessor">#define MAC_MODE_CHALLENGE              ((uint8_t)0x00)         </span></div><div class="line"><a name="l00520"></a><span class="lineno"><a class="line" href="a00987.html#gaaf599e8acc392c2ef07eba93eafc474d">  520</a></span>&#160;<span class="preprocessor">#define MAC_MODE_BLOCK2_TEMPKEY         ((uint8_t)0x01)         </span></div><div class="line"><a name="l00521"></a><span class="lineno"><a class="line" href="a00987.html#ga1ed0d355896761d1cfef4d3b225fefae">  521</a></span>&#160;<span class="preprocessor">#define MAC_MODE_BLOCK1_TEMPKEY         ((uint8_t)0x02)         </span></div><div class="line"><a name="l00522"></a><span class="lineno"><a class="line" href="a00987.html#gadffd78899cf3d3dd18afc5ce3c54acb4">  522</a></span>&#160;<span class="preprocessor">#define MAC_MODE_SOURCE_FLAG_MATCH      ((uint8_t)0x04)         </span></div><div class="line"><a name="l00523"></a><span class="lineno"><a class="line" href="a00987.html#gafe14a4d41dbd21bb5cfdd9c17f22d2d2">  523</a></span>&#160;<span class="preprocessor">#define MAC_MODE_PTNONCE_TEMPKEY        ((uint8_t)0x06)         </span></div><div class="line"><a name="l00524"></a><span class="lineno"><a class="line" href="a00987.html#ga41beaf29ad684f5fae6046c689d6bcf1">  524</a></span>&#160;<span class="preprocessor">#define MAC_MODE_PASSTHROUGH            ((uint8_t)0x07)         </span></div><div class="line"><a name="l00525"></a><span class="lineno"><a class="line" href="a00987.html#gae5da70c1f37ee40a0cf4edc459d5840a">  525</a></span>&#160;<span class="preprocessor">#define MAC_MODE_INCLUDE_OTP_88         ((uint8_t)0x10)         </span></div><div class="line"><a name="l00526"></a><span class="lineno"><a class="line" href="a00987.html#ga0bd9324a824410d7787c6fcd6e29d8a2">  526</a></span>&#160;<span class="preprocessor">#define MAC_MODE_INCLUDE_OTP_64         ((uint8_t)0x20)         </span></div><div class="line"><a name="l00527"></a><span class="lineno"><a class="line" href="a00987.html#gae2afa3244b7efc9ffd9a93dd6e5b71b5">  527</a></span>&#160;<span class="preprocessor">#define MAC_MODE_INCLUDE_SN             ((uint8_t)0x40)         </span></div><div class="line"><a name="l00528"></a><span class="lineno"><a class="line" href="a00987.html#ga921afead5f0a35822bc8263c3a1e1761">  528</a></span>&#160;<span class="preprocessor">#define MAC_CHALLENGE_SIZE              (32)                    </span></div><div class="line"><a name="l00529"></a><span class="lineno"><a class="line" href="a00987.html#ga4c987156ced719bbcf398ab6c76289c0">  529</a></span>&#160;<span class="preprocessor">#define MAC_SIZE                        (32)                    </span></div><div class="line"><a name="l00530"></a><span class="lineno"><a class="line" href="a00987.html#ga6e6b931cf58debb1a23b87c16c7b4d47">  530</a></span>&#160;<span class="preprocessor">#define MAC_MODE_MASK                   ((uint8_t)0x77)         </span></div><div class="line"><a name="l00531"></a><span class="lineno"><a class="line" href="a00987.html#ga1e34a5e5e8b86355569f958ecbaff3d4">  531</a></span>&#160;<span class="preprocessor">#define MAC_RSP_SIZE                    ATCA_RSP_SIZE_32        </span></div><div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00536"></a><span class="lineno"><a class="line" href="a00987.html#ga97ca81334088c297c577f4b4aaced3cf">  536</a></span>&#160;<span class="preprocessor">#define NONCE_MODE_IDX                  ATCA_PARAM1_IDX          </span></div><div class="line"><a name="l00537"></a><span class="lineno"><a class="line" href="a00987.html#gaabd0af10b17e4e1c4bf7a4cfd3cca1f0">  537</a></span>&#160;<span class="preprocessor">#define NONCE_PARAM2_IDX                ATCA_PARAM2_IDX          </span></div><div class="line"><a name="l00538"></a><span class="lineno"><a class="line" href="a00987.html#ga98721952094435f45bffa352dd6848ad">  538</a></span>&#160;<span class="preprocessor">#define NONCE_INPUT_IDX                 ATCA_DATA_IDX            </span></div><div class="line"><a name="l00539"></a><span class="lineno"><a class="line" href="a00987.html#gacff2b897c994e1444f8e94e638c25c74">  539</a></span>&#160;<span class="preprocessor">#define NONCE_COUNT_SHORT               (ATCA_CMD_SIZE_MIN + 20) </span></div><div class="line"><a name="l00540"></a><span class="lineno"><a class="line" href="a00987.html#ga9a7fddf245cba834f86e0b63f2b14dc1">  540</a></span>&#160;<span class="preprocessor">#define NONCE_COUNT_LONG                (ATCA_CMD_SIZE_MIN + 32) </span></div><div class="line"><a name="l00541"></a><span class="lineno"><a class="line" href="a00987.html#gaaffdf30ca558bdd5f772578742835306">  541</a></span>&#160;<span class="preprocessor">#define NONCE_COUNT_LONG_64             (ATCA_CMD_SIZE_MIN + 64) </span></div><div class="line"><a name="l00542"></a><span class="lineno"><a class="line" href="a00987.html#ga98be7c54d55328daa4390a816c9bb243">  542</a></span>&#160;<span class="preprocessor">#define NONCE_MODE_MASK                 ((uint8_t)0x03)          </span></div><div class="line"><a name="l00543"></a><span class="lineno"><a class="line" href="a00987.html#ga798018a4ef489e8fb0a02b5edf7e9d55">  543</a></span>&#160;<span class="preprocessor">#define NONCE_MODE_SEED_UPDATE          ((uint8_t)0x00)          </span></div><div class="line"><a name="l00544"></a><span class="lineno"><a class="line" href="a00987.html#gae3f2d180d7f35d9a7876a28972f2f587">  544</a></span>&#160;<span class="preprocessor">#define NONCE_MODE_NO_SEED_UPDATE       ((uint8_t)0x01)          </span></div><div class="line"><a name="l00545"></a><span class="lineno"><a class="line" href="a00987.html#ga7c675071c7fd650a29594c5fcc9882a1">  545</a></span>&#160;<span class="preprocessor">#define NONCE_MODE_INVALID              ((uint8_t)0x02)          </span></div><div class="line"><a name="l00546"></a><span class="lineno"><a class="line" href="a00987.html#ga6132b175668ba4d6efecca5986c007c0">  546</a></span>&#160;<span class="preprocessor">#define NONCE_MODE_PASSTHROUGH          ((uint8_t)0x03)          </span></div><div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00548"></a><span class="lineno"><a class="line" href="a00987.html#gad83ef570608a572d2dd99e6954e14d40">  548</a></span>&#160;<span class="preprocessor">#define NONCE_MODE_INPUT_LEN_MASK       ((uint8_t)0x20)          </span></div><div class="line"><a name="l00549"></a><span class="lineno"><a class="line" href="a00987.html#gaf7ee0188ab539a350a6da19fe3f34a72">  549</a></span>&#160;<span class="preprocessor">#define NONCE_MODE_INPUT_LEN_32         ((uint8_t)0x00)          </span></div><div class="line"><a name="l00550"></a><span class="lineno"><a class="line" href="a00987.html#ga54f085984c6aaf826263a755fd3243d7">  550</a></span>&#160;<span class="preprocessor">#define NONCE_MODE_INPUT_LEN_64         ((uint8_t)0x20)          </span></div><div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00552"></a><span class="lineno"><a class="line" href="a00987.html#gab887d70e4a421cf2bcab6b77feba4134">  552</a></span>&#160;<span class="preprocessor">#define NONCE_MODE_TARGET_MASK          ((uint8_t)0xC0)          </span></div><div class="line"><a name="l00553"></a><span class="lineno"><a class="line" href="a00987.html#gac51f4a863e071bce52c995ddae7e2144">  553</a></span>&#160;<span class="preprocessor">#define NONCE_MODE_TARGET_TEMPKEY       ((uint8_t)0x00)          </span></div><div class="line"><a name="l00554"></a><span class="lineno"><a class="line" href="a00987.html#ga071a95b4b2048e0d879e6e13984e38fd">  554</a></span>&#160;<span class="preprocessor">#define NONCE_MODE_TARGET_MSGDIGBUF     ((uint8_t)0x40)          </span></div><div class="line"><a name="l00555"></a><span class="lineno"><a class="line" href="a00987.html#ga8ad263b7b321311a57db7600f18a555f">  555</a></span>&#160;<span class="preprocessor">#define NONCE_MODE_TARGET_ALTKEYBUF     ((uint8_t)0x80)          </span></div><div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00557"></a><span class="lineno"><a class="line" href="a00987.html#ga99bca33105a872e8a20fe199cc17219b">  557</a></span>&#160;<span class="preprocessor">#define NONCE_ZERO_CALC_MASK            ((uint16_t)0x8000)       </span></div><div class="line"><a name="l00558"></a><span class="lineno"><a class="line" href="a00987.html#ga80b8b54f333be5a587f22e2d04812de6">  558</a></span>&#160;<span class="preprocessor">#define NONCE_ZERO_CALC_RANDOM          ((uint16_t)0x0000)       </span></div><div class="line"><a name="l00559"></a><span class="lineno"><a class="line" href="a00987.html#ga2a2b74db24609199702267614fc31990">  559</a></span>&#160;<span class="preprocessor">#define NONCE_ZERO_CALC_TEMPKEY         ((uint16_t)0x8000)       </span></div><div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00561"></a><span class="lineno"><a class="line" href="a00987.html#gad0c3da8203a3be6755e86cda96e00228">  561</a></span>&#160;<span class="preprocessor">#define NONCE_NUMIN_SIZE                (20)                     </span></div><div class="line"><a name="l00562"></a><span class="lineno"><a class="line" href="a00987.html#gab568e0ec9f976d91d7940c227e8d73ee">  562</a></span>&#160;<span class="preprocessor">#define NONCE_NUMIN_SIZE_PASSTHROUGH    (32)                     </span></div><div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00564"></a><span class="lineno"><a class="line" href="a00987.html#ga2ecf97f43e4b2fbe3f329bb7c8e3b675">  564</a></span>&#160;<span class="preprocessor">#define NONCE_RSP_SIZE_SHORT            ATCA_RSP_SIZE_MIN        </span></div><div class="line"><a name="l00565"></a><span class="lineno"><a class="line" href="a00987.html#ga7ae9dcc07ca9d990e9db6d8949ac935a">  565</a></span>&#160;<span class="preprocessor">#define NONCE_RSP_SIZE_LONG             ATCA_RSP_SIZE_32         </span></div><div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00570"></a><span class="lineno"><a class="line" href="a00987.html#ga49f538b630cc416a8ad1f6d784e3a1e4">  570</a></span>&#160;<span class="preprocessor">#define PAUSE_SELECT_IDX                ATCA_PARAM1_IDX     </span></div><div class="line"><a name="l00571"></a><span class="lineno"><a class="line" href="a00987.html#gad74ed86697c0977d4e0a2451068b7131">  571</a></span>&#160;<span class="preprocessor">#define PAUSE_PARAM2_IDX                ATCA_PARAM2_IDX     </span></div><div class="line"><a name="l00572"></a><span class="lineno"><a class="line" href="a00987.html#gaa914251d0e03f7d1850ee04296715f14">  572</a></span>&#160;<span class="preprocessor">#define PAUSE_COUNT                     ATCA_CMD_SIZE_MIN   </span></div><div class="line"><a name="l00573"></a><span class="lineno"><a class="line" href="a00987.html#ga5859f9a2eb99b4636c894705047e9344">  573</a></span>&#160;<span class="preprocessor">#define PAUSE_RSP_SIZE                  ATCA_RSP_SIZE_MIN   </span></div><div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00578"></a><span class="lineno"><a class="line" href="a00987.html#ga376a70cf087e157cbb914d9ca2e5b989">  578</a></span>&#160;<span class="preprocessor">#define PRIVWRITE_ZONE_IDX          ATCA_PARAM1_IDX     </span></div><div class="line"><a name="l00579"></a><span class="lineno"><a class="line" href="a00987.html#ga4aa5b68bbd7847f53444608615653832">  579</a></span>&#160;<span class="preprocessor">#define PRIVWRITE_KEYID_IDX         ATCA_PARAM2_IDX     </span></div><div class="line"><a name="l00580"></a><span class="lineno"><a class="line" href="a00987.html#gab65b17098ebc6027a9240ca84c07ab5c">  580</a></span>&#160;<span class="preprocessor">#define PRIVWRITE_VALUE_IDX         ( 5)                </span></div><div class="line"><a name="l00581"></a><span class="lineno"><a class="line" href="a00987.html#ga20afccf35c609f05a3d7dc70687baa2e">  581</a></span>&#160;<span class="preprocessor">#define PRIVWRITE_MAC_IDX           (41)                </span></div><div class="line"><a name="l00582"></a><span class="lineno"><a class="line" href="a00987.html#ga17980d6743441fa2afd71523006ae058">  582</a></span>&#160;<span class="preprocessor">#define PRIVWRITE_COUNT             (75)                </span></div><div class="line"><a name="l00583"></a><span class="lineno"><a class="line" href="a00987.html#gaba7cf525ec69429e947f294361e1cdab">  583</a></span>&#160;<span class="preprocessor">#define PRIVWRITE_ZONE_MASK         ((uint8_t)0x40)     </span></div><div class="line"><a name="l00584"></a><span class="lineno"><a class="line" href="a00987.html#gafa24177621a8a2fbe041ef0ce73a414d">  584</a></span>&#160;<span class="preprocessor">#define PRIVWRITE_MODE_ENCRYPT      ((uint8_t)0x40)     </span></div><div class="line"><a name="l00585"></a><span class="lineno"><a class="line" href="a00987.html#gaa66ad8429261c1ba13d064d660d6d464">  585</a></span>&#160;<span class="preprocessor">#define PRIVWRITE_RSP_SIZE          ATCA_RSP_SIZE_MIN   </span></div><div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00590"></a><span class="lineno"><a class="line" href="a00987.html#gac846e3f7c924497d70254125dae38dce">  590</a></span>&#160;<span class="preprocessor">#define RANDOM_MODE_IDX                 ATCA_PARAM1_IDX     </span></div><div class="line"><a name="l00591"></a><span class="lineno"><a class="line" href="a00987.html#ga3f54bd6d53a687ae3660196497e8faa1">  591</a></span>&#160;<span class="preprocessor">#define RANDOM_PARAM2_IDX               ATCA_PARAM2_IDX     </span></div><div class="line"><a name="l00592"></a><span class="lineno"><a class="line" href="a00987.html#gae91d272f84bc3ad357ff6ed2e9c9a6b0">  592</a></span>&#160;<span class="preprocessor">#define RANDOM_COUNT                    ATCA_CMD_SIZE_MIN   </span></div><div class="line"><a name="l00593"></a><span class="lineno"><a class="line" href="a00987.html#gaf12673d4006ff926c863b2d0f9038561">  593</a></span>&#160;<span class="preprocessor">#define RANDOM_SEED_UPDATE              ((uint8_t)0x00)     </span></div><div class="line"><a name="l00594"></a><span class="lineno"><a class="line" href="a00987.html#ga444d3fe4302ca95080d919dc89b1bc52">  594</a></span>&#160;<span class="preprocessor">#define RANDOM_NO_SEED_UPDATE           ((uint8_t)0x01)     </span></div><div class="line"><a name="l00595"></a><span class="lineno"><a class="line" href="a00987.html#ga2197c0ad6c0fbf1c801228de9bf0d2ab">  595</a></span>&#160;<span class="preprocessor">#define RANDOM_NUM_SIZE                 ((uint8_t)32)       </span></div><div class="line"><a name="l00596"></a><span class="lineno"><a class="line" href="a00987.html#gaeb7623b070997b65f0bb108abf8e5f44">  596</a></span>&#160;<span class="preprocessor">#define RANDOM_RSP_SIZE                 ATCA_RSP_SIZE_32    </span></div><div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00601"></a><span class="lineno"><a class="line" href="a00987.html#gae273cfc99b8538b3c81ba8240a6ff425">  601</a></span>&#160;<span class="preprocessor">#define READ_ZONE_IDX               ATCA_PARAM1_IDX         </span></div><div class="line"><a name="l00602"></a><span class="lineno"><a class="line" href="a00987.html#gaf9f464ac4065aff75f5967933725d665">  602</a></span>&#160;<span class="preprocessor">#define READ_ADDR_IDX               ATCA_PARAM2_IDX         </span></div><div class="line"><a name="l00603"></a><span class="lineno"><a class="line" href="a00987.html#gad222baf9301d2d35a5c928a0d91c4335">  603</a></span>&#160;<span class="preprocessor">#define READ_COUNT                  ATCA_CMD_SIZE_MIN       </span></div><div class="line"><a name="l00604"></a><span class="lineno"><a class="line" href="a00987.html#gacf9c81ae1249f3c174ec75cf65517176">  604</a></span>&#160;<span class="preprocessor">#define READ_ZONE_MASK              ((uint8_t)0x83)         </span></div><div class="line"><a name="l00605"></a><span class="lineno"><a class="line" href="a00987.html#ga041cfaec382d0a67dcfe36d43332da48">  605</a></span>&#160;<span class="preprocessor">#define READ_4_RSP_SIZE             ATCA_RSP_SIZE_VAL       </span></div><div class="line"><a name="l00606"></a><span class="lineno"><a class="line" href="a00987.html#gad79706b7b1e6c0e0d29afe692d8d5c06">  606</a></span>&#160;<span class="preprocessor">#define READ_32_RSP_SIZE            ATCA_RSP_SIZE_32        </span></div><div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00611"></a><span class="lineno"><a class="line" href="a00987.html#ga7ff1918de6f8238ba4f67d9368e3587d">  611</a></span>&#160;<span class="preprocessor">#define SECUREBOOT_MODE_IDX           ATCA_PARAM1_IDX                                                          </span></div><div class="line"><a name="l00612"></a><span class="lineno"><a class="line" href="a00987.html#ga9257968de99742ec468463a72588820f">  612</a></span>&#160;<span class="preprocessor">#define SECUREBOOT_DIGEST_SIZE        (32)                                                                     </span></div><div class="line"><a name="l00613"></a><span class="lineno"><a class="line" href="a00987.html#ga51bd4fe709f11b3b50f47c2fb18976ca">  613</a></span>&#160;<span class="preprocessor">#define SECUREBOOT_SIGNATURE_SIZE     (64)                                                                     </span></div><div class="line"><a name="l00614"></a><span class="lineno"><a class="line" href="a00987.html#ga4d6eb2ea4f3b5be450c0579f75fc7f6e">  614</a></span>&#160;<span class="preprocessor">#define SECUREBOOT_COUNT_DIG          (ATCA_CMD_SIZE_MIN + SECUREBOOT_DIGEST_SIZE)                             </span></div><div class="line"><a name="l00615"></a><span class="lineno"><a class="line" href="a00987.html#gabd28a29107703b43a734301acf491f5c">  615</a></span>&#160;<span class="preprocessor">#define SECUREBOOT_COUNT_DIG_SIG      (ATCA_CMD_SIZE_MIN + SECUREBOOT_DIGEST_SIZE + SECUREBOOT_SIGNATURE_SIZE) </span></div><div class="line"><a name="l00616"></a><span class="lineno"><a class="line" href="a00987.html#gaed2edebc2be522d7bb38f85d273406f9">  616</a></span>&#160;<span class="preprocessor">#define SECUREBOOT_MAC_SIZE           (32)                                                                     </span></div><div class="line"><a name="l00617"></a><span class="lineno"><a class="line" href="a00987.html#gab4657866a69a00b9b3bfa4df51521fa6">  617</a></span>&#160;<span class="preprocessor">#define SECUREBOOT_RSP_SIZE_NO_MAC    ATCA_RSP_SIZE_MIN                                                        </span></div><div class="line"><a name="l00618"></a><span class="lineno"><a class="line" href="a00987.html#ga3db7049de685080f046f0b4221de461b">  618</a></span>&#160;<span class="preprocessor">#define SECUREBOOT_RSP_SIZE_MAC       (ATCA_PACKET_OVERHEAD + SECUREBOOT_MAC_SIZE)                             </span></div><div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00620"></a><span class="lineno"><a class="line" href="a00987.html#gaac36b471fe92c252dd02a9d1cc2c65e2">  620</a></span>&#160;<span class="preprocessor">#define SECUREBOOT_MODE_MASK          ((uint8_t)0x07)                                                          </span></div><div class="line"><a name="l00621"></a><span class="lineno"><a class="line" href="a00987.html#ga122f4b7b9f1011c04385a7caccc2d536">  621</a></span>&#160;<span class="preprocessor">#define SECUREBOOT_MODE_FULL          ((uint8_t)0x05)                                                          </span></div><div class="line"><a name="l00622"></a><span class="lineno"><a class="line" href="a00987.html#ga2aac76b15694b82fda038e127d152297">  622</a></span>&#160;<span class="preprocessor">#define SECUREBOOT_MODE_FULL_STORE    ((uint8_t)0x06)                                                          </span></div><div class="line"><a name="l00623"></a><span class="lineno"><a class="line" href="a00987.html#ga3d287922c127b599204ea3bc64d4a825">  623</a></span>&#160;<span class="preprocessor">#define SECUREBOOT_MODE_FULL_COPY     ((uint8_t)0x07)                                                          </span></div><div class="line"><a name="l00624"></a><span class="lineno"><a class="line" href="a00987.html#ga2d04ced68d56c0db40b93b767de02089">  624</a></span>&#160;<span class="preprocessor">#define SECUREBOOT_MODE_PROHIBIT_FLAG ((uint8_t)0x40)                                                          </span></div><div class="line"><a name="l00625"></a><span class="lineno"><a class="line" href="a00987.html#gabf2bad62bab02224f51d67f6725575a4">  625</a></span>&#160;<span class="preprocessor">#define SECUREBOOT_MODE_ENC_MAC_FLAG  ((uint8_t)0x80)                                                          </span></div><div class="line"><a name="l00626"></a><span class="lineno">  626</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00627"></a><span class="lineno"><a class="line" href="a00987.html#gad10e2a3c801be9002d53af14357dbe9f">  627</a></span>&#160;<span class="preprocessor">#define SECUREBOOTCONFIG_OFFSET         (70)                                                                   </span></div><div class="line"><a name="l00628"></a><span class="lineno"><a class="line" href="a00987.html#ga0c9c951895abf02992e41c617702c2ea">  628</a></span>&#160;<span class="preprocessor">#define SECUREBOOTCONFIG_MODE_MASK      ((uint16_t)0x0003)                                                     </span></div><div class="line"><a name="l00629"></a><span class="lineno"><a class="line" href="a00987.html#ga76bf5d4ce89c95c658328fe8e66669e7">  629</a></span>&#160;<span class="preprocessor">#define SECUREBOOTCONFIG_MODE_DISABLED  ((uint16_t)0x0000)                                                     </span></div><div class="line"><a name="l00630"></a><span class="lineno"><a class="line" href="a00987.html#ga2b86bf6731827368bf66eec960c35a32">  630</a></span>&#160;<span class="preprocessor">#define SECUREBOOTCONFIG_MODE_FULL_BOTH ((uint16_t)0x0001)                                                     </span></div><div class="line"><a name="l00631"></a><span class="lineno"><a class="line" href="a00987.html#ga43bb6027c548274980a3ba42bdef51c9">  631</a></span>&#160;<span class="preprocessor">#define SECUREBOOTCONFIG_MODE_FULL_SIG  ((uint16_t)0x0002)                                                     </span></div><div class="line"><a name="l00632"></a><span class="lineno"><a class="line" href="a00987.html#ga9b7c3aca6168b52321e1951893efa050">  632</a></span>&#160;<span class="preprocessor">#define SECUREBOOTCONFIG_MODE_FULL_DIG  ((uint16_t)0x0003)                                                     </span></div><div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00637"></a><span class="lineno"><a class="line" href="a00987.html#gaa16bfad9cb883d258befaacadb3385ef">  637</a></span>&#160;<span class="preprocessor">#define SELFTEST_MODE_IDX                   ATCA_PARAM1_IDX          </span></div><div class="line"><a name="l00638"></a><span class="lineno"><a class="line" href="a00987.html#ga2aba96712a9932d61146c43289e9d808">  638</a></span>&#160;<span class="preprocessor">#define SELFTEST_COUNT                      ATCA_CMD_SIZE_MIN        </span></div><div class="line"><a name="l00639"></a><span class="lineno"><a class="line" href="a00987.html#gacd9a7a2257f664a4f9f674d37eb95bef">  639</a></span>&#160;<span class="preprocessor">#define SELFTEST_MODE_RNG                   ((uint8_t)0x01)          </span></div><div class="line"><a name="l00640"></a><span class="lineno"><a class="line" href="a00987.html#gafbd09beedecedcf316a6c02e40d1e712">  640</a></span>&#160;<span class="preprocessor">#define SELFTEST_MODE_ECDSA_SIGN_VERIFY     ((uint8_t)0x02)          </span></div><div class="line"><a name="l00641"></a><span class="lineno"><a class="line" href="a00987.html#ga01d7437a14fd35ccc926168fb4ca2ca7">  641</a></span>&#160;<span class="preprocessor">#define SELFTEST_MODE_ECDH                  ((uint8_t)0x08)          </span></div><div class="line"><a name="l00642"></a><span class="lineno"><a class="line" href="a00987.html#ga91ebd87544ccdab3670cfbec8d23bd4a">  642</a></span>&#160;<span class="preprocessor">#define SELFTEST_MODE_AES                   ((uint8_t)0x10)          </span></div><div class="line"><a name="l00643"></a><span class="lineno"><a class="line" href="a00987.html#gafab9546447cf1e0020c32d298a1d897f">  643</a></span>&#160;<span class="preprocessor">#define SELFTEST_MODE_SHA                   ((uint8_t)0x20)          </span></div><div class="line"><a name="l00644"></a><span class="lineno"><a class="line" href="a00987.html#ga1ef61cb184d3ff5ef2f8bf9db6521888">  644</a></span>&#160;<span class="preprocessor">#define SELFTEST_MODE_ALL                   ((uint8_t)0x3B)          </span></div><div class="line"><a name="l00645"></a><span class="lineno"><a class="line" href="a00987.html#ga7599639f80f3ac2a0d22f2857138cb87">  645</a></span>&#160;<span class="preprocessor">#define SELFTEST_RSP_SIZE                   ATCA_RSP_SIZE_MIN        </span></div><div class="line"><a name="l00646"></a><span class="lineno">  646</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00650"></a><span class="lineno"><a class="line" href="a00987.html#ga49e390c29b6fc05df227604c169b86b0">  650</a></span>&#160;<span class="preprocessor">#define SHA_COUNT_SHORT                     ATCA_CMD_SIZE_MIN</span></div><div class="line"><a name="l00651"></a><span class="lineno"><a class="line" href="a00987.html#gada37181a648dd51b374eec1cbb4bbaa3">  651</a></span>&#160;<span class="preprocessor">#define SHA_COUNT_LONG                      ATCA_CMD_SIZE_MIN  </span></div><div class="line"><a name="l00652"></a><span class="lineno"><a class="line" href="a00987.html#gad1d5f6fcf8f33b7ea3061280620df8bd">  652</a></span>&#160;<span class="preprocessor">#define ATCA_SHA_DIGEST_SIZE                (32)</span></div><div class="line"><a name="l00653"></a><span class="lineno"><a class="line" href="a00987.html#gad89ca95de067d12cd2f35a60b0e997b1">  653</a></span>&#160;<span class="preprocessor">#define SHA_DATA_MAX                        (64)</span></div><div class="line"><a name="l00654"></a><span class="lineno"><a class="line" href="a00987.html#ga85e0a506bd6fdae6ce32d5df3a48ac1c">  654</a></span>&#160;<span class="preprocessor">#define ATCA_SHA256_BLOCK_SIZE              (64)</span></div><div class="line"><a name="l00655"></a><span class="lineno"><a class="line" href="a00987.html#ga3d37a5da1c43d44e49c4e6614d133c7e">  655</a></span>&#160;<span class="preprocessor">#define SHA_CONTEXT_MAX_SIZE                (99)</span></div><div class="line"><a name="l00656"></a><span class="lineno">  656</span>&#160;</div><div class="line"><a name="l00657"></a><span class="lineno"><a class="line" href="a00987.html#ga612cbf6171e9a0a176e0bd2844f49528">  657</a></span>&#160;<span class="preprocessor">#define SHA_MODE_MASK                       ((uint8_t)0x07)   </span></div><div class="line"><a name="l00658"></a><span class="lineno"><a class="line" href="a00987.html#gad42195362cd7dca0acabc8739c9a6fc4">  658</a></span>&#160;<span class="preprocessor">#define SHA_MODE_SHA256_START               ((uint8_t)0x00)   </span></div><div class="line"><a name="l00659"></a><span class="lineno"><a class="line" href="a00987.html#ga05ece414a0596ec9bb75c0ca8ca731dc">  659</a></span>&#160;<span class="preprocessor">#define SHA_MODE_SHA256_UPDATE              ((uint8_t)0x01)   </span></div><div class="line"><a name="l00660"></a><span class="lineno"><a class="line" href="a00987.html#ga0e98e55c91c7559f57fdef4c9969c188">  660</a></span>&#160;<span class="preprocessor">#define SHA_MODE_SHA256_END                 ((uint8_t)0x02)   </span></div><div class="line"><a name="l00661"></a><span class="lineno"><a class="line" href="a00987.html#ga0f2fc749d3d196477b22cbceee856dfb">  661</a></span>&#160;<span class="preprocessor">#define SHA_MODE_SHA256_PUBLIC              ((uint8_t)0x03)   </span></div><div class="line"><a name="l00662"></a><span class="lineno"><a class="line" href="a00987.html#gabbfeec0d0247336b8c6e993d4db17d11">  662</a></span>&#160;<span class="preprocessor">#define SHA_MODE_HMAC_START                 ((uint8_t)0x04)   </span></div><div class="line"><a name="l00663"></a><span class="lineno"><a class="line" href="a00987.html#ga2071156124a692a5f2a5c764c923f731">  663</a></span>&#160;<span class="preprocessor">#define SHA_MODE_HMAC_UPDATE                ((uint8_t)0x01)   </span></div><div class="line"><a name="l00664"></a><span class="lineno"><a class="line" href="a00987.html#gaeb307ed9134e0fa2f0fcbdaf7b01515d">  664</a></span>&#160;<span class="preprocessor">#define SHA_MODE_HMAC_END                   ((uint8_t)0x05)   </span></div><div class="line"><a name="l00665"></a><span class="lineno"><a class="line" href="a00987.html#ga625604e07a0618bd7d514faee5e42fba">  665</a></span>&#160;<span class="preprocessor">#define SHA_MODE_608_HMAC_END               ((uint8_t)0x02)   </span></div><div class="line"><a name="l00666"></a><span class="lineno"><a class="line" href="a00987.html#gac7e5a54695b8bd9e5087ebb94df70b39">  666</a></span>&#160;<span class="preprocessor">#define SHA_MODE_READ_CONTEXT               ((uint8_t)0x06)   </span></div><div class="line"><a name="l00667"></a><span class="lineno"><a class="line" href="a00987.html#ga7b7c499931480a88f6a106644c3d2185">  667</a></span>&#160;<span class="preprocessor">#define SHA_MODE_WRITE_CONTEXT              ((uint8_t)0x07)   </span></div><div class="line"><a name="l00668"></a><span class="lineno"><a class="line" href="a00987.html#ga70f88a123587c96ad7affc1e5dae9002">  668</a></span>&#160;<span class="preprocessor">#define SHA_MODE_TARGET_MASK                ((uint8_t)0xC0)   </span></div><div class="line"><a name="l00669"></a><span class="lineno"><a class="line" href="a00987.html#ga850ec56b408fccccaea5826d452c3a64">  669</a></span>&#160;<span class="preprocessor">#define SHA_MODE_TARGET_TEMPKEY             ((uint8_t)0x00)   </span></div><div class="line"><a name="l00670"></a><span class="lineno"><a class="line" href="a00987.html#gae559b402c678cc51f8252b927b8781e5">  670</a></span>&#160;<span class="preprocessor">#define SHA_MODE_TARGET_MSGDIGBUF           ((uint8_t)0x40)   </span></div><div class="line"><a name="l00671"></a><span class="lineno"><a class="line" href="a00987.html#gae0df4b9151bb3d807bc1c532036c6d88">  671</a></span>&#160;<span class="preprocessor">#define SHA_MODE_TARGET_OUT_ONLY            ((uint8_t)0xC0)   </span></div><div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00673"></a><span class="lineno"><a class="line" href="a00987.html#ga8a5a586bdb0194be827417658836bf9c">  673</a></span>&#160;<span class="preprocessor">#define SHA_RSP_SIZE                        ATCA_RSP_SIZE_32  </span></div><div class="line"><a name="l00674"></a><span class="lineno"><a class="line" href="a00987.html#ga74490b179b34f9925e9fe00675e53713">  674</a></span>&#160;<span class="preprocessor">#define SHA_RSP_SIZE_SHORT                  ATCA_RSP_SIZE_MIN </span></div><div class="line"><a name="l00675"></a><span class="lineno"><a class="line" href="a00987.html#gae5ad3c81d0b62f4b86a4a0dc84a79134">  675</a></span>&#160;<span class="preprocessor">#define SHA_RSP_SIZE_LONG                   ATCA_RSP_SIZE_32  </span></div><div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00680"></a><span class="lineno"><a class="line" href="a00146.html#ae7cfb9eb789137f5ea9195a7a4f6b11e">  680</a></span>&#160;<span class="preprocessor">#define SIGN_MODE_IDX               ATCA_PARAM1_IDX     </span></div><div class="line"><a name="l00681"></a><span class="lineno"><a class="line" href="a00146.html#a02f20fbee84fe680d94b94a2b2828040">  681</a></span>&#160;<span class="preprocessor">#define SIGN_KEYID_IDX              ATCA_PARAM2_IDX     </span></div><div class="line"><a name="l00682"></a><span class="lineno"><a class="line" href="a00146.html#aabff3f5b7f5391c27a0329ff0c997264">  682</a></span>&#160;<span class="preprocessor">#define SIGN_COUNT                  ATCA_CMD_SIZE_MIN   </span></div><div class="line"><a name="l00683"></a><span class="lineno"><a class="line" href="a00146.html#a88cc1851cedb6f2a73df4618dbc0b165">  683</a></span>&#160;<span class="preprocessor">#define SIGN_MODE_MASK              ((uint8_t)0xE1)     </span></div><div class="line"><a name="l00684"></a><span class="lineno"><a class="line" href="a00146.html#aced5221c0f15440eb52fa9f460956443">  684</a></span>&#160;<span class="preprocessor">#define SIGN_MODE_INTERNAL          ((uint8_t)0x00)     </span></div><div class="line"><a name="l00685"></a><span class="lineno"><a class="line" href="a00146.html#a1acc7b9af9cf3c6c556bd910ce4f239b">  685</a></span>&#160;<span class="preprocessor">#define SIGN_MODE_INVALIDATE        ((uint8_t)0x01)     </span></div><div class="line"><a name="l00686"></a><span class="lineno"><a class="line" href="a00146.html#a71b7f8f45dbbe8c19c0e5c6c41fcf116">  686</a></span>&#160;<span class="preprocessor">#define SIGN_MODE_INCLUDE_SN        ((uint8_t)0x40)     </span></div><div class="line"><a name="l00687"></a><span class="lineno"><a class="line" href="a00146.html#a9b6844bb107f02832a6d827b8c5b0fda">  687</a></span>&#160;<span class="preprocessor">#define SIGN_MODE_EXTERNAL          ((uint8_t)0x80)     </span></div><div class="line"><a name="l00688"></a><span class="lineno"><a class="line" href="a00146.html#a35246a9bad0d77d26b59b542928c9e34">  688</a></span>&#160;<span class="preprocessor">#define SIGN_MODE_SOURCE_MASK       ((uint8_t)0x20)     </span></div><div class="line"><a name="l00689"></a><span class="lineno"><a class="line" href="a00146.html#a73670681360e1272aa13d1359e7bb275">  689</a></span>&#160;<span class="preprocessor">#define SIGN_MODE_SOURCE_TEMPKEY    ((uint8_t)0x00)     </span></div><div class="line"><a name="l00690"></a><span class="lineno"><a class="line" href="a00146.html#a1a38e9575eb4f714377889ce5270e60b">  690</a></span>&#160;<span class="preprocessor">#define SIGN_MODE_SOURCE_MSGDIGBUF  ((uint8_t)0x20)     </span></div><div class="line"><a name="l00691"></a><span class="lineno"><a class="line" href="a00146.html#a66dba5e06f73c5df37c9d18409185f4d">  691</a></span>&#160;<span class="preprocessor">#define SIGN_RSP_SIZE               ATCA_RSP_SIZE_MAX   </span></div><div class="line"><a name="l00692"></a><span class="lineno">  692</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00696"></a><span class="lineno"><a class="line" href="a00146.html#abec02770ab378eea5c604269dc8c024a">  696</a></span>&#160;<span class="preprocessor">#define UPDATE_MODE_IDX             ATCA_PARAM1_IDX       </span></div><div class="line"><a name="l00697"></a><span class="lineno"><a class="line" href="a00146.html#a0aacda6ef1cf79b10b3a2a7e2e9d8799">  697</a></span>&#160;<span class="preprocessor">#define UPDATE_VALUE_IDX            ATCA_PARAM2_IDX       </span></div><div class="line"><a name="l00698"></a><span class="lineno"><a class="line" href="a00146.html#aac8020f191ca7ce2b1a81fcede9b5aa2">  698</a></span>&#160;<span class="preprocessor">#define UPDATE_COUNT                ATCA_CMD_SIZE_MIN     </span></div><div class="line"><a name="l00699"></a><span class="lineno"><a class="line" href="a00146.html#abe02b5e0e9bb8cb4c2a727549c14ae55">  699</a></span>&#160;<span class="preprocessor">#define UPDATE_MODE_USER_EXTRA      ((uint8_t)0x00)       </span></div><div class="line"><a name="l00700"></a><span class="lineno"><a class="line" href="a00146.html#a81bab82e6be63d8186b26bb9c3b8732c">  700</a></span>&#160;<span class="preprocessor">#define UPDATE_MODE_SELECTOR        ((uint8_t)0x01)       </span></div><div class="line"><a name="l00701"></a><span class="lineno"><a class="line" href="a00146.html#a5884f043019e78838621ba2402a8cc95">  701</a></span>&#160;<span class="preprocessor">#define UPDATE_MODE_USER_EXTRA_ADD  UPDATE_MODE_SELECTOR  </span></div><div class="line"><a name="l00702"></a><span class="lineno"><a class="line" href="a00146.html#a023880ad2167cc0d6cefb7f747b73c92">  702</a></span>&#160;<span class="preprocessor">#define UPDATE_MODE_DEC_COUNTER     ((uint8_t)0x02)       </span></div><div class="line"><a name="l00703"></a><span class="lineno"><a class="line" href="a00146.html#aabf82974c18252bcd0c48ee99af75dfb">  703</a></span>&#160;<span class="preprocessor">#define UPDATE_RSP_SIZE             ATCA_RSP_SIZE_MIN     </span></div><div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00708"></a><span class="lineno"><a class="line" href="a00146.html#a896cc15df167f9a04f7e4f84de2bc7d2">  708</a></span>&#160;<span class="preprocessor">#define VERIFY_MODE_IDX                ATCA_PARAM1_IDX      </span></div><div class="line"><a name="l00709"></a><span class="lineno"><a class="line" href="a00146.html#a868d5d7ce0451e1c8f95f16092cfbc97">  709</a></span>&#160;<span class="preprocessor">#define VERIFY_KEYID_IDX               ATCA_PARAM2_IDX      </span></div><div class="line"><a name="l00710"></a><span class="lineno"><a class="line" href="a00146.html#a15623038b9b0b4b51243691fe15253e2">  710</a></span>&#160;<span class="preprocessor">#define VERIFY_DATA_IDX                (  5)                </span></div><div class="line"><a name="l00711"></a><span class="lineno"><a class="line" href="a00146.html#a0b7d56888416e08f1ff67252072e3cea">  711</a></span>&#160;<span class="preprocessor">#define VERIFY_256_STORED_COUNT        ( 71)                </span></div><div class="line"><a name="l00712"></a><span class="lineno"><a class="line" href="a00146.html#a3f7d34f0bcacd6c816c2b51cd13f5364">  712</a></span>&#160;<span class="preprocessor">#define VERIFY_283_STORED_COUNT        ( 79)                </span></div><div class="line"><a name="l00713"></a><span class="lineno"><a class="line" href="a00146.html#a677e57736342aed3a7a40704b82895d9">  713</a></span>&#160;<span class="preprocessor">#define VERIFY_256_VALIDATE_COUNT      ( 90)                </span></div><div class="line"><a name="l00714"></a><span class="lineno"><a class="line" href="a00146.html#ab09e6f726235fba47a2ea3f49cbfc2cb">  714</a></span>&#160;<span class="preprocessor">#define VERIFY_283_VALIDATE_COUNT      ( 98)                </span></div><div class="line"><a name="l00715"></a><span class="lineno"><a class="line" href="a00146.html#aae43276ff3f774ffd928ad1776592c7b">  715</a></span>&#160;<span class="preprocessor">#define VERIFY_256_EXTERNAL_COUNT      (135)                </span></div><div class="line"><a name="l00716"></a><span class="lineno"><a class="line" href="a00146.html#a1a551775820d79c59f49068140e40f1b">  716</a></span>&#160;<span class="preprocessor">#define VERIFY_283_EXTERNAL_COUNT      (151)                </span></div><div class="line"><a name="l00717"></a><span class="lineno"><a class="line" href="a00146.html#add994f7919c2f2b076f25ff207432686">  717</a></span>&#160;<span class="preprocessor">#define VERIFY_256_KEY_SIZE            ( 64)                </span></div><div class="line"><a name="l00718"></a><span class="lineno"><a class="line" href="a00146.html#af0cca41df253e49372d6853d4f5c406b">  718</a></span>&#160;<span class="preprocessor">#define VERIFY_283_KEY_SIZE            ( 72)                </span></div><div class="line"><a name="l00719"></a><span class="lineno"><a class="line" href="a00146.html#ae56700f2b05067288af3cc4af8e7f34d">  719</a></span>&#160;<span class="preprocessor">#define VERIFY_256_SIGNATURE_SIZE      ( 64)                </span></div><div class="line"><a name="l00720"></a><span class="lineno"><a class="line" href="a00146.html#a47f281930ad5bc31576ccd06e913563f">  720</a></span>&#160;<span class="preprocessor">#define VERIFY_283_SIGNATURE_SIZE      ( 72)                </span></div><div class="line"><a name="l00721"></a><span class="lineno"><a class="line" href="a00146.html#a5a4ff6025fa5d4d936ededc78be16e47">  721</a></span>&#160;<span class="preprocessor">#define VERIFY_OTHER_DATA_SIZE         ( 19)                </span></div><div class="line"><a name="l00722"></a><span class="lineno"><a class="line" href="a00146.html#ac892dbe1953c43e7e17b1d51ce967c9e">  722</a></span>&#160;<span class="preprocessor">#define VERIFY_MODE_MASK               ((uint8_t)0x03)      </span></div><div class="line"><a name="l00723"></a><span class="lineno"><a class="line" href="a00146.html#a1da616e68f89a90e6fa3c920b4708fe2">  723</a></span>&#160;<span class="preprocessor">#define VERIFY_MODE_STORED             ((uint8_t)0x00)      </span></div><div class="line"><a name="l00724"></a><span class="lineno"><a class="line" href="a00146.html#a8f38093650cd530f44dc59e6eb78fa3d">  724</a></span>&#160;<span class="preprocessor">#define VERIFY_MODE_VALIDATE_EXTERNAL  ((uint8_t)0x01)      </span></div><div class="line"><a name="l00725"></a><span class="lineno"><a class="line" href="a00146.html#af3729ff16ba78ef4a6b70c341e81c749">  725</a></span>&#160;<span class="preprocessor">#define VERIFY_MODE_EXTERNAL           ((uint8_t)0x02)      </span></div><div class="line"><a name="l00726"></a><span class="lineno"><a class="line" href="a00146.html#adb7f53410523734e4c9485f2d71e7791">  726</a></span>&#160;<span class="preprocessor">#define VERIFY_MODE_VALIDATE           ((uint8_t)0x03)      </span></div><div class="line"><a name="l00727"></a><span class="lineno"><a class="line" href="a00146.html#ab45a164ee20c8320318a3bc5e2eaa31f">  727</a></span>&#160;<span class="preprocessor">#define VERIFY_MODE_INVALIDATE         ((uint8_t)0x07)      </span></div><div class="line"><a name="l00728"></a><span class="lineno"><a class="line" href="a00146.html#a3d6ae4ea1e385c2f7521495b53715a3f">  728</a></span>&#160;<span class="preprocessor">#define VERIFY_MODE_SOURCE_MASK        ((uint8_t)0x20)      </span></div><div class="line"><a name="l00729"></a><span class="lineno"><a class="line" href="a00146.html#ad5c40b78682251cb07855e58bcf29f82">  729</a></span>&#160;<span class="preprocessor">#define VERIFY_MODE_SOURCE_TEMPKEY     ((uint8_t)0x00)      </span></div><div class="line"><a name="l00730"></a><span class="lineno"><a class="line" href="a00146.html#a1b104109ce8d8c8a99484bc52d58460a">  730</a></span>&#160;<span class="preprocessor">#define VERIFY_MODE_SOURCE_MSGDIGBUF   ((uint8_t)0x20)      </span></div><div class="line"><a name="l00731"></a><span class="lineno"><a class="line" href="a00146.html#af3461e50ec2b06201d17feee167e0a4b">  731</a></span>&#160;<span class="preprocessor">#define VERIFY_MODE_MAC_FLAG           ((uint8_t)0x80)      </span></div><div class="line"><a name="l00732"></a><span class="lineno"><a class="line" href="a00146.html#a4c6b67a2a6193a1e317b6ef16ca3fca6">  732</a></span>&#160;<span class="preprocessor">#define VERIFY_KEY_B283                ((uint16_t)0x0000)   </span></div><div class="line"><a name="l00733"></a><span class="lineno"><a class="line" href="a00146.html#ad2eacbf59056d95e69b60f21beaafcb1">  733</a></span>&#160;<span class="preprocessor">#define VERIFY_KEY_K283                ((uint16_t)0x0001)   </span></div><div class="line"><a name="l00734"></a><span class="lineno"><a class="line" href="a00146.html#a94fc1ff3975c056868a169b1b836f920">  734</a></span>&#160;<span class="preprocessor">#define VERIFY_KEY_P256                ((uint16_t)0x0004)   </span></div><div class="line"><a name="l00735"></a><span class="lineno"><a class="line" href="a00146.html#ac75be9d5426dcf6ee196a788a35ee54b">  735</a></span>&#160;<span class="preprocessor">#define VERIFY_RSP_SIZE                ATCA_RSP_SIZE_MIN    </span></div><div class="line"><a name="l00736"></a><span class="lineno"><a class="line" href="a00146.html#ace51b2a4dc8622ac3c03780dc369355e">  736</a></span>&#160;<span class="preprocessor">#define VERIFY_RSP_SIZE_MAC            ATCA_RSP_SIZE_32     </span></div><div class="line"><a name="l00737"></a><span class="lineno">  737</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00741"></a><span class="lineno"><a class="line" href="a00146.html#a8cbed81461d4e4c4991c50629b3a5bcd">  741</a></span>&#160;<span class="preprocessor">#define WRITE_ZONE_IDX              ATCA_PARAM1_IDX     </span></div><div class="line"><a name="l00742"></a><span class="lineno"><a class="line" href="a00146.html#a2d9e0bcb5ccf94f140b1cd519f407ffa">  742</a></span>&#160;<span class="preprocessor">#define WRITE_ADDR_IDX              ATCA_PARAM2_IDX     </span></div><div class="line"><a name="l00743"></a><span class="lineno"><a class="line" href="a00146.html#a5cdd382afc6d46da59de60fb35abd611">  743</a></span>&#160;<span class="preprocessor">#define WRITE_VALUE_IDX             ATCA_DATA_IDX       </span></div><div class="line"><a name="l00744"></a><span class="lineno"><a class="line" href="a00146.html#a203996620baf9cdf0aa01dd719e02d06">  744</a></span>&#160;<span class="preprocessor">#define WRITE_MAC_VS_IDX            ( 9)                </span></div><div class="line"><a name="l00745"></a><span class="lineno"><a class="line" href="a00146.html#a9c08115363fb521e9fee60849046f820">  745</a></span>&#160;<span class="preprocessor">#define WRITE_MAC_VL_IDX            (37)                </span></div><div class="line"><a name="l00746"></a><span class="lineno"><a class="line" href="a00146.html#a3b8fb940e149c6fb29801ef573cc6311">  746</a></span>&#160;<span class="preprocessor">#define WRITE_MAC_SIZE              (32)                </span></div><div class="line"><a name="l00747"></a><span class="lineno"><a class="line" href="a00146.html#aacd5623cd6f8eb12e7cdf22941f501dc">  747</a></span>&#160;<span class="preprocessor">#define WRITE_ZONE_MASK             ((uint8_t)0xC3)     </span></div><div class="line"><a name="l00748"></a><span class="lineno"><a class="line" href="a00146.html#ac02ad2aea02f18d833e6e0631ae839ad">  748</a></span>&#160;<span class="preprocessor">#define WRITE_ZONE_WITH_MAC         ((uint8_t)0x40)     </span></div><div class="line"><a name="l00749"></a><span class="lineno"><a class="line" href="a00146.html#a830d379174b47b466f5de16fe3345182">  749</a></span>&#160;<span class="preprocessor">#define WRITE_ZONE_OTP              ((uint8_t)1)        </span></div><div class="line"><a name="l00750"></a><span class="lineno"><a class="line" href="a00146.html#ae80ecfb4c696095b5627988cc7c9cde0">  750</a></span>&#160;<span class="preprocessor">#define WRITE_ZONE_DATA             ((uint8_t)2)        </span></div><div class="line"><a name="l00751"></a><span class="lineno"><a class="line" href="a00146.html#af0ac761b64981003336d72c34df3d2e3">  751</a></span>&#160;<span class="preprocessor">#define WRITE_RSP_SIZE              ATCA_RSP_SIZE_MIN   </span></div><div class="line"><a name="l00752"></a><span class="lineno">  752</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00754"></a><span class="lineno">  754</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00755"></a><span class="lineno">  755</span>&#160;}</div><div class="line"><a name="l00756"></a><span class="lineno">  756</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00757"></a><span class="lineno">  757</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00758"></a><span class="lineno">  758</span>&#160;</div><div class="ttc" id="a00987_html_ga9404883f6b81e6356862a9bb4b42d4a9"><div class="ttname"><a href="a00987.html#ga9404883f6b81e6356862a9bb4b42d4a9">deleteATCACommand</a></div><div class="ttdeci">void deleteATCACommand(ATCACommand *ca_cmd)</div><div class="ttdoc">ATCACommand destructor.</div><div class="ttdef"><b>Definition:</b> atca_command.c:597</div></div>
<div class="ttc" id="a00987_html_ga47c96fd19a050247f7c06e20c296b958"><div class="ttname"><a href="a00987.html#ga47c96fd19a050247f7c06e20c296b958">atSelfTest</a></div><div class="ttdeci">ATCA_STATUS atSelfTest(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand AES method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:513</div></div>
<div class="ttc" id="a00987_html_gaf90f39bafcd296962ceef461954a1998"><div class="ttname"><a href="a00987.html#gaf90f39bafcd296962ceef461954a1998">atPrivWrite</a></div><div class="ttdeci">ATCA_STATUS atPrivWrite(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand PrivWrite method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:279</div></div>
<div class="ttc" id="a00987_html_ga31f11cb28f4aaf6c654e92e7c5176814"><div class="ttname"><a href="a00987.html#ga31f11cb28f4aaf6c654e92e7c5176814">atHMAC</a></div><div class="ttdeci">ATCA_STATUS atHMAC(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand HMAC method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:161</div></div>
<div class="ttc" id="a00987_html_gaab5bc48599e5f6b938901739f4f46fa7"><div class="ttname"><a href="a00987.html#gaab5bc48599e5f6b938901739f4f46fa7">atWrite</a></div><div class="ttdeci">ATCA_STATUS atWrite(ATCACommand ca_cmd, ATCAPacket *packet, bool has_mac)</div><div class="ttdoc">ATCACommand Write method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:463</div></div>
<div class="ttc" id="a00987_html_gae41108996848638519849163e51cd10a"><div class="ttname"><a href="a00987.html#gae41108996848638519849163e51cd10a">isATCAError</a></div><div class="ttdeci">ATCA_STATUS isATCAError(uint8_t *data)</div><div class="ttdoc">checks for basic error frame in data</div><div class="ttdef"><b>Definition:</b> atca_command.c:723</div></div>
<div class="ttc" id="a00987_html_gab0937e5d717246f51a244e3369e554e6"><div class="ttname"><a href="a00987.html#gab0937e5d717246f51a244e3369e554e6">atNonce</a></div><div class="ttdeci">ATCA_STATUS atNonce(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand Nonce method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:225</div></div>
<div class="ttc" id="a00987_html_gae82a969d437b648238fe1c1ddbd51196"><div class="ttname"><a href="a00987.html#gae82a969d437b648238fe1c1ddbd51196">atCheckMAC</a></div><div class="ttdeci">ATCA_STATUS atCheckMAC(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand CheckMAC method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:45</div></div>
<div class="ttc" id="a00987_html_gae9bbe9f768acf9628bbb78fbebb21221"><div class="ttname"><a href="a00987.html#gae9bbe9f768acf9628bbb78fbebb21221">atPause</a></div><div class="ttdeci">ATCA_STATUS atPause(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand Pause method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:265</div></div>
<div class="ttc" id="a00987_html_ga3890dfc5d5a3ec121ba7436fe90bee23"><div class="ttname"><a href="a00987.html#ga3890dfc5d5a3ec121ba7436fe90bee23">atUpdateExtra</a></div><div class="ttdeci">ATCA_STATUS atUpdateExtra(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand UpdateExtra method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:410</div></div>
<div class="ttc" id="a00987_html_ga17ffd71c28597552f5c4517096ef1fb8"><div class="ttname"><a href="a00987.html#ga17ffd71c28597552f5c4517096ef1fb8">atAES</a></div><div class="ttdeci">ATCA_STATUS atAES(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand AES method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:490</div></div>
<div class="ttc" id="a00987_html_gae82dca54cc3fd1cc2f1671e98d64df07"><div class="ttname"><a href="a00987.html#gae82dca54cc3fd1cc2f1671e98d64df07">atIsECCFamily</a></div><div class="ttdeci">bool atIsECCFamily(ATCADeviceType device_type)</div><div class="ttdoc">determines if a given device type is an ECC device or a superset of a ECC device</div><div class="ttdef"><b>Definition:</b> atca_command.c:703</div></div>
<div class="ttc" id="a00987_html_gaf41d61bc7317d325a34169eb53c29e7c"><div class="ttname"><a href="a00987.html#gaf41d61bc7317d325a34169eb53c29e7c">atSign</a></div><div class="ttdeci">ATCA_STATUS atSign(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand Sign method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:396</div></div>
<div class="ttc" id="a01001_html"><div class="ttname"><a href="a01001.html">atca_command</a></div><div class="ttdoc">atca_command is the C object backing ATCACommand.</div><div class="ttdef"><b>Definition:</b> atca_command.h:52</div></div>
<div class="ttc" id="a00987_html_gaebeafc249bfe2b00b6809d5c328841d9"><div class="ttname"><a href="a00987.html#gaebeafc249bfe2b00b6809d5c328841d9">ATCACommand</a></div><div class="ttdeci">struct atca_command * ATCACommand</div><div class="ttdef"><b>Definition:</b> atca_command.h:60</div></div>
<div class="ttc" id="a00173_html_a22bd6643f31f1d75dc3e7ea939f468cd"><div class="ttname"><a href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a></div><div class="ttdeci">ATCA_STATUS</div><div class="ttdef"><b>Definition:</b> atca_status.h:41</div></div>
<div class="ttc" id="a00987_html_gac004e4f2b9a435f9de6cea523c0e9a2d"><div class="ttname"><a href="a00987.html#gac004e4f2b9a435f9de6cea523c0e9a2d">newATCACommand</a></div><div class="ttdeci">ATCACommand newATCACommand(ATCADeviceType device_type)</div><div class="ttdoc">constructor for ATCACommand</div><div class="ttdef"><b>Definition:</b> atca_command.c:575</div></div>
<div class="ttc" id="a01005_html_a3c02ddae56a01b6df3be14acf14915a4"><div class="ttname"><a href="a01005.html#a3c02ddae56a01b6df3be14acf14915a4">ATCAPacket::txsize</a></div><div class="ttdeci">uint8_t txsize</div><div class="ttdef"><b>Definition:</b> atca_command.h:100</div></div>
<div class="ttc" id="a01001_html_aebea355958c50f7d6a7d946f33ddc0aa"><div class="ttname"><a href="a01001.html#aebea355958c50f7d6a7d946f33ddc0aa">atca_command::dt</a></div><div class="ttdeci">ATCADeviceType dt</div><div class="ttdef"><b>Definition:</b> atca_command.h:54</div></div>
<div class="ttc" id="a00987_html_ga44ad135152469c980f9bf36a5f1477bb"><div class="ttname"><a href="a00987.html#ga44ad135152469c980f9bf36a5f1477bb">atSHA</a></div><div class="ttdeci">ATCA_STATUS atSHA(ATCACommand ca_cmd, ATCAPacket *packet, uint16_t write_context_size)</div><div class="ttdoc">ATCACommand SHA method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:352</div></div>
<div class="ttc" id="a00987_html_ga8e8e14d6ac01e36f5c62568a6203e158"><div class="ttname"><a href="a00987.html#ga8e8e14d6ac01e36f5c62568a6203e158">atDeriveKey</a></div><div class="ttdeci">ATCA_STATUS atDeriveKey(ATCACommand ca_cmd, ATCAPacket *packet, bool has_mac)</div><div class="ttdoc">ATCACommand DeriveKey method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:74</div></div>
<div class="ttc" id="a00987_html_ga54460acd927854db5d39d6d5c3e8ed7c"><div class="ttname"><a href="a00987.html#ga54460acd927854db5d39d6d5c3e8ed7c">atCalcCrc</a></div><div class="ttdeci">void atCalcCrc(ATCAPacket *pkt)</div><div class="ttdoc">This function calculates CRC and adds it to the correct offset in the packet data.</div><div class="ttdef"><b>Definition:</b> atca_command.c:647</div></div>
<div class="ttc" id="a00158_html"><div class="ttname"><a href="a00158.html">atca_devtypes.h</a></div><div class="ttdoc">Microchip Crypto Auth.</div></div>
<div class="ttc" id="a00987_html_gac649ffd477409f414dfcc7e38c19e203"><div class="ttname"><a href="a00987.html#gac649ffd477409f414dfcc7e38c19e203">atLock</a></div><div class="ttdeci">ATCA_STATUS atLock(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand Lock method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:189</div></div>
<div class="ttc" id="a00987_html_ga6375d9724ac9ec208e22224c0a210fb3"><div class="ttname"><a href="a00987.html#ga6375d9724ac9ec208e22224c0a210fb3">atMAC</a></div><div class="ttdeci">ATCA_STATUS atMAC(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand MAC method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:203</div></div>
<div class="ttc" id="a00987_html_ga96b33dc28e87b1c1855b7f828a89594b"><div class="ttname"><a href="a00987.html#ga96b33dc28e87b1c1855b7f828a89594b">atGenDig</a></div><div class="ttdeci">ATCA_STATUS atGenDig(ATCACommand ca_cmd, ATCAPacket *packet, bool is_no_mac_key)</div><div class="ttdoc">ATCACommand Generate Digest method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:113</div></div>
<div class="ttc" id="a00149_html"><div class="ttname"><a href="a00149.html">atca_compiler.h</a></div><div class="ttdoc">CryptoAuthLiub is meant to be portable across architectures, even non-Microchip architectures and com...</div></div>
<div class="ttc" id="a00987_html_ga8a61451b473025766f0b8aaf8cbe8878"><div class="ttname"><a href="a00987.html#ga8a61451b473025766f0b8aaf8cbe8878">atCounter</a></div><div class="ttdeci">ATCA_STATUS atCounter(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand Counter method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:59</div></div>
<div class="ttc" id="a00987_html_gaba4a495c2021c837c6de4cdeaaf64813"><div class="ttname"><a href="a00987.html#gaba4a495c2021c837c6de4cdeaaf64813">atGenKey</a></div><div class="ttdeci">ATCA_STATUS atGenKey(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand Generate Key method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:139</div></div>
<div class="ttc" id="a01001_html_a380510ad0d2dbde608f38387436db3bc"><div class="ttname"><a href="a01001.html#a380510ad0d2dbde608f38387436db3bc">atca_command::clock_divider</a></div><div class="ttdeci">uint8_t clock_divider</div><div class="ttdef"><b>Definition:</b> atca_command.h:55</div></div>
<div class="ttc" id="a01001_html_a77632045612dbd0a5ac4488567c14dd3"><div class="ttname"><a href="a01001.html#a77632045612dbd0a5ac4488567c14dd3">atca_command::execution_time_msec</a></div><div class="ttdeci">uint16_t execution_time_msec</div><div class="ttdef"><b>Definition:</b> atca_command.h:56</div></div>
<div class="ttc" id="a01005_html_a7f16544e2e38e2a389b69be0a7156986"><div class="ttname"><a href="a01005.html#a7f16544e2e38e2a389b69be0a7156986">ATCAPacket::execTime</a></div><div class="ttdeci">uint8_t execTime</div><div class="ttdef"><b>Definition:</b> atca_command.h:111</div></div>
<div class="ttc" id="a00987_html_ga5ecdb99e756b1740ad2119f13c3ab809"><div class="ttname"><a href="a00987.html#ga5ecdb99e756b1740ad2119f13c3ab809">atSecureBoot</a></div><div class="ttdeci">ATCA_STATUS atSecureBoot(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand SecureBoot method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:321</div></div>
<div class="ttc" id="a01005_html"><div class="ttname"><a href="a01005.html">ATCAPacket</a></div><div class="ttdoc">an ATCA packet structure. This is a superset of the packet transmitted on the wire....</div><div class="ttdef"><b>Definition:</b> atca_command.h:93</div></div>
<div class="ttc" id="a00987_html_gaae5866a78d2f0464b04eee9ef1f97030"><div class="ttname"><a href="a00987.html#gaae5866a78d2f0464b04eee9ef1f97030">atIsSHAFamily</a></div><div class="ttdeci">bool atIsSHAFamily(ATCADeviceType device_type)</div><div class="ttdoc">determines if a given device type is a SHA device or a superset of a SHA device</div><div class="ttdef"><b>Definition:</b> atca_command.c:682</div></div>
<div class="ttc" id="a01005_html_ad64c25d49d8bac111d62c92a0e552289"><div class="ttname"><a href="a01005.html#ad64c25d49d8bac111d62c92a0e552289">ATCAPacket::_reserved</a></div><div class="ttdeci">uint8_t _reserved</div><div class="ttdef"><b>Definition:</b> atca_command.h:97</div></div>
<div class="ttc" id="a00987_html_gad16fd3d0f3602f4654c29101f35bd2a1"><div class="ttname"><a href="a00987.html#gad16fd3d0f3602f4654c29101f35bd2a1">atRandom</a></div><div class="ttdeci">ATCA_STATUS atRandom(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand Random method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:293</div></div>
<div class="ttc" id="a00987_html_gaf4177bd66c5981ba86511608150c024e"><div class="ttname"><a href="a00987.html#gaf4177bd66c5981ba86511608150c024e">initATCACommand</a></div><div class="ttdeci">ATCA_STATUS initATCACommand(ATCADeviceType device_type, ATCACommand ca_cmd)</div><div class="ttdoc">Initializer for ATCACommand.</div><div class="ttdef"><b>Definition:</b> atca_command.c:556</div></div>
<div class="ttc" id="a01005_html_a16a7565b150a9c17a39c80fc932b9514"><div class="ttname"><a href="a01005.html#a16a7565b150a9c17a39c80fc932b9514">ATCAPacket::param2</a></div><div class="ttdeci">uint16_t param2</div><div class="ttdef"><b>Definition:</b> atca_command.h:103</div></div>
<div class="ttc" id="a01005_html_a5c1b56e6bccc2a95dbddf1a08e56e87d"><div class="ttname"><a href="a01005.html#a5c1b56e6bccc2a95dbddf1a08e56e87d">ATCAPacket::opcode</a></div><div class="ttdeci">uint8_t opcode</div><div class="ttdef"><b>Definition:</b> atca_command.h:101</div></div>
<div class="ttc" id="a00987_html_ga17fa9d23b7e46c2eb32f8ae6132bb3c4"><div class="ttname"><a href="a00987.html#ga17fa9d23b7e46c2eb32f8ae6132bb3c4">atRead</a></div><div class="ttdeci">ATCA_STATUS atRead(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand Read method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:307</div></div>
<div class="ttc" id="a00988_html_gafb234ccd6a80d09c0efbe336c2354267"><div class="ttname"><a href="a00988.html#gafb234ccd6a80d09c0efbe336c2354267">ATCADeviceType</a></div><div class="ttdeci">ATCADeviceType</div><div class="ttdoc">The supported Device type in Cryptoauthlib library.</div><div class="ttdef"><b>Definition:</b> atca_devtypes.h:41</div></div>
<div class="ttc" id="a00987_html_ga7723a58d1781b3ba54e8f45d5729b33a"><div class="ttname"><a href="a00987.html#ga7723a58d1781b3ba54e8f45d5729b33a">atCheckCrc</a></div><div class="ttdeci">ATCA_STATUS atCheckCrc(const uint8_t *response)</div><div class="ttdoc">This function checks the consistency of a response.</div><div class="ttdef"><b>Definition:</b> atca_command.c:665</div></div>
<div class="ttc" id="a00987_html_gaf5b69354b7f33537f2ffef3376843a15"><div class="ttname"><a href="a00987.html#gaf5b69354b7f33537f2ffef3376843a15">atInfo</a></div><div class="ttdeci">ATCA_STATUS atInfo(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand Info method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:175</div></div>
<div class="ttc" id="a00987_html_ga5460e5bb2178eb95a3b8db8018d30617"><div class="ttname"><a href="a00987.html#ga5460e5bb2178eb95a3b8db8018d30617">atECDH</a></div><div class="ttdeci">ATCA_STATUS atECDH(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand ECDH method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:98</div></div>
<div class="ttc" id="a00987_html_ga53ded4ed630b6ef4d292056c2e6b34f6"><div class="ttname"><a href="a00987.html#ga53ded4ed630b6ef4d292056c2e6b34f6">atCRC</a></div><div class="ttdeci">void atCRC(size_t length, const uint8_t *data, uint8_t *crc_le)</div><div class="ttdoc">Calculates CRC over the given raw data and returns the CRC in little-endian byte order.</div><div class="ttdef"><b>Definition:</b> atca_command.c:617</div></div>
<div class="ttc" id="a01005_html_aec4226da1b99c821237b6805c4e31333"><div class="ttname"><a href="a01005.html#aec4226da1b99c821237b6805c4e31333">ATCAPacket::param1</a></div><div class="ttdeci">uint8_t param1</div><div class="ttdef"><b>Definition:</b> atca_command.h:102</div></div>
<div class="ttc" id="a00173_html"><div class="ttname"><a href="a00173.html">atca_status.h</a></div><div class="ttdoc">Microchip Crypto Auth status codes.</div></div>
<div class="ttc" id="a00987_html_ga881ba1c37e33cf65c17983e93dd8c677"><div class="ttname"><a href="a00987.html#ga881ba1c37e33cf65c17983e93dd8c677">atKDF</a></div><div class="ttdeci">ATCA_STATUS atKDF(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand KDF method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:530</div></div>
<div class="ttc" id="a00987_html_ga2beb9e8360555ededb666ad845219fce"><div class="ttname"><a href="a00987.html#ga2beb9e8360555ededb666ad845219fce">atVerify</a></div><div class="ttdeci">ATCA_STATUS atVerify(ATCACommand ca_cmd, ATCAPacket *packet)</div><div class="ttdoc">ATCACommand ECDSA Verify method.</div><div class="ttdef"><b>Definition:</b> atca_command.c:424</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_97aefd0d527b934f1d99a682da8fe6a9.html">lib</a></li><li class="navelem"><a class="el" href="a00146.html">atca_command.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
